Odp: komenda ktora teleportuje w dan? pozycje tylko gdy gracz jest w pz
[LUA]function onSay(cid, item, fromPosition, itemEx, toPosition)
local pozycja = {x=1000, y=1000, z=7}
if not getCreatureCondition(cid, CONDITION_INFIGHT) then
doTeleportThing(cid, pozycja)
doSendMagicEffect(getCreaturePosition(cid), 53)
return doPlayerSendTextMessage(cid, 23, "Teleportowales sie do depo")
elseif doPlayerSendTextMessage(cid, 23, "Nie mozesz sie teleportowac, bo masz pk.") then
end
return true
end [/LUA]
Tutaj masz je?eli gracz ma pk (miecze lub czaszke) to nie mo?e tepa?. Je?li nie ma i jest poza pz to tepa, a je?li chcesz, ?eby tylko w pz tepa?o to musisz zmieni? t? linijk? :
[LUA]if not getCreatureCondition(cid, CONDITION_INFIGHT) then [/LUA]
na [LUA]if getTileInfoPZ(cid, cos tu wpisa? chyba PZ_LOCKED) then[/LUA]
Nie chc? mi si? szuka? ju? po necie jak to by?o ale to z t? funkcj?.