[8.+][Actions] Skrypt, który daje acces +1
Tworzymy plik tutor.lua w \actions\scripts
Kod:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerGroupId(cid) <= 2 then
setPlayerGroupId(cid, 1)
doPlayerSendTextMessage(cid,4,"Congratulations ".. getPlayerName(cid) .." you were a tutor!")
doRemoveItem(item.uid, 1)
doSendMagicEffect(getPlayerPosition(cid), 30)
else
doPlayerSendCancel(cid, "You have a greater range, and therefore can not be a tutor!")
end
return 1
do actions.xml dodajemy linijkę:
Kod:
<action itemid="2345" script="tutor.lua"/>
Pozdrawiam,
Esio.