- Joined
- Nov 23, 2008
- Messages
- 1,865
- Reaction score
- 123
LUA:
------------------------------------
-----------Made by Tauku------------
----------Thanks to Fare------------
----------For helping me------------
----------Correcting my Errors------
function onStepIn(cid, item, frompos, itemEx, topos)
if item.itemid == 9067 and getPlayerLevel(cid) >= 70 getPlayerVocation(cid) == 2 then --The ground is itemID ID 9067 and the player should be level 70 or above and he must carry the vocation of a druid
doItemSetAttribute(item.uid, "aid", 9000)--The ActionID of the tile, set in mapeditor.
doPlayerSetExtraExpRate(cid, 3) and --This is how much his Exp Rate raises when he walks on the tile
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your Destiny has been set, prepair for a long journey "..getCreatureName(cid).." where you'll become a new man") --Message he gets if his lvl 70+ and Druid
end
if getPlayerLevel(cid) < 70 then --If the player is lower than level 70
doTeleportThing(cid, frompos, true) --He will be pushed back to his old position
doPlayerSendCancel(cid,"You don't have the required level to step on this tile.") --And he'll receive this message
if getPlayerVocation(cid) == 2 false then --If it's anybody other than vocation 2 = a druid then
doPlayerSendCancel(cid,"You have to be a druid in order to step on this tile.") then --He'll receive this message
doTeleportThing(cid, frompos, true) --Does teleport the player back to his original spot for returning true
end
return true
end
and in movements.lua you add
LUA:
<movevent type="StepIn" itemid="9067" event="script" value="Name OF YOUR SCRIPT HERE.lua"/>
Note
It's not tested yet.
There's an explanation to what it does if you look at the right side of the script, thanks.
It's for 0.3.6pl1
Last edited: