Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Lua by qya ( 16 years ago )
local TeleportTo = {
[8000] = {pos={x=0,y=0,z=0),fee=100;},
[8001] = {pos={x=0,y=0,z=0},fee=0;};
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
 if(TeleportTo[item.actionid].fee) then
  if(not doPlayerRemoveMoney(cid,TeleportTo[item.actionid].fee)) then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You Need ".. TeleportTo[item.actionid].fee .." gold coins to use an elevator.");
   return false;
  end
 end
 doTeleportThing(cid, TeleportTo[item.actionid].pos, TRUE);
 doSendMagicEffect(fromPosition, CONST_ME_POFF);
 doSendMagicEffect(TeleportTo[item.actionid].pos, CONST_ME_TELEPORT);
 return doTransformItem(item.uid, item.id==1945 and 1946 or 1945)
end

 

Revise this Paste

Your Name: Code Language: