LucasFerraz
Systems Analyst
After seeing this thread I thought, in every monster fit 8 people, but if my enemy is training afk, I will push him out.
What I must do to 'If player try to push player in DUMMY TILE' then he will receive message 'Not possible'.
Examples:
---
I made it:
Evan made it
Evil Mark made it:
Aziz made it:
Ratser made this:
Does someone knows how to make it automatically?
What I must do to 'If player try to push player in DUMMY TILE' then he will receive message 'Not possible'.
Examples:
---
I made it:
XML:<event type="push" name="playerPush" event="script" value="push.lua"/>
Lua:local fromPosition = {x="1000", y="1000", z="7"} local toPosition = {x="2000", y="2000", z="9"} function onPush(cid, target) if (target == isPlayer(cid)) and (isInRange(cid, fromPosition, toPosition) == true) then doPlayerSendCancel(cid, "Sorry, not possible.") end end
Evan made it
Here's the script if you wanna do the tile clicking:
Lua:function onStepIn(cid, item, fromPosition, toPosition) if isPlayer(cid) then doCreatureSetNoMove(cid, cannotMove) end return true end
Lua:function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(cid) and getCreatureNoMove(cid) == true then doCreatureSetNoMove(cid, false) end return true end
Evil Mark made it:
Lua:function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isPlayer(cid) then doCreatureSetNoMove(cid, true) doSendAnimatedText(toPosition, "Training!", math.random(0, 255)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "In order to leave this booth you have to dance.") doCreatureSetLookDirection(cid, 0) while (getCreatureLookDirection(cid) ~= 0) then doCreatureSetNoMove(cid, false) end else doTeleportThing(cid, fromPosition, false) end return true end
Aziz made it:
Lua:function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if actor ~= cid then doTeleportThing(cid, lastPosition, true) end return true end
Ratser made this:
antipush.lua:
creaturescripts.xml:Lua:local targetlist, ret = {"Target Dummy"}, true function onPush(cid, target, ground, position) if(isInArray(targetlist, getCreatureTarget(target):lower())) then ret = RETURNVALUE_NOTPOSSIBLE end return ret end
XML:<event type="push" name="AntiPush" event="script" value="antipush.lua"/>
Does someone knows how to make it automatically?
Last edited: