|
- TibiaFans! Forum Prawdziwego Tibijczyka http://www.tibiafans.pun.pl/index.php - Skrypty XML.LUA http://www.tibiafans.pun.pl/viewforum.php?id=5 - Przejście tylko dla Pacc :) http://www.tibiafans.pun.pl/viewtopic.php?id=121 |
| Xylio - 2008-05-20 16:10:39 |
Do Movements.xml dodajemy: Kod:<movevent event="StepIn" actionid="4001" script="pacc.lua" /> <movevent event="StepIn" actionid="4002" script="pacc.lua" /> <movevent event="StepIn" actionid="4003" script="pacc.lua" /> <movevent event="StepIn" actionid="4004" script="pacc.lua" /> <movevent event="StepOut" actionid="4001" script="pacc.lua" /> <movevent event="StepOut" actionid="4002" script="pacc.lua" /> <movevent event="StepOut" actionid="4003" script="pacc.lua" /> <movevent event="StepOut" actionid="4004" script="pacc.lua" /> Tworzymy plik pacc.lua w scripts o takiej tresci: Kod:function onStepIn(cid, item, pos) local north = 4001 -- Male wyjasnienie. Tutaj chodzi o kierunek swiata local south = 4002 -- gdzie ma teleportowac gracza local west = 4003 -- o jedna kratke w tyl. Opisze to dokladniej w poscie. local east = 4004 -- if isPremium(cid) then doTransformItem(item.uid, 425) elseif item.actionid == north then pos.y = pos.y - 1 doTeleportThing(cid, pos) doPlayerSendTextMessage(cid,22,'Sorry, you dont have premium account') elseif item.actionid == east then pos.x = pos.x + 1 doTeleportThing(cid, pos) doPlayerSendTextMessage(cid,22,'Sorry, you dont have premium account') elseif item.actionid == west then pos.x = pos.x - 1 doTeleportThing(cid, pos) doPlayerSendTextMessage(cid,22,'Sorry, you dont have premium account') elseif item.actionid == south then pos.y = pos.y + 1 doTeleportThing(cid, pos) doPlayerSendTextMessage(cid,22,'Sorry, you dont have premium account') end end function onStepOut(cid, item, pos) if item.itemid == 425 then doTransformItem(item.uid, 426) end end I teraz pora na wyjasnienia. Te zmienne-kierunki swiata to kierunek w ktora odepchnie gracza gdy ten nie ma pacc. Tak wiec zmienna NORTH zawiera Actionid pola ktore odepchnie FACC w strone polnocy (w gore znaczy sie). |