Mam tu taki skrypcik niestety nie działa funkcja 'checking'
Skrypt powinien usuwać graczowi 5 soul points co każde x sekund jeżeli gracz stoi na kratce i jest online (taki anty 24/7 bot na trainerach).
wywala mi:
A o to skrypt
Trzeba by było także sprawdzić czy gracz stoi dalej na tej kratce, jeżeli nie to dać stopEvent.
Rep++
Skrypt powinien usuwać graczowi 5 soul points co każde x sekund jeżeli gracz stoi na kratce i jest online (taki anty 24/7 bot na trainerach).
wywala mi:
Code:
[Error - MoveEvents Interface]
In a timer event called from:
data/movements/scripts/soulless.lua:onStepIn
Description:
(luaDoPlayerSendCancel) Player not found
A o to skrypt
Code:
function onStepIn(cid, item, pos)
if (item.actionid == 18888) then
if getPlayerSoul(cid) > 5 then
--player can enter
doPlayerSendCancel(cid, "Happy Training.")
addEvent(checking, 3 * 1000)
else
doPlayerSendCancel(cid, "You have not enough soul points.")
--player can't enter
end
end
return TRUE
end
function checking(cid)
if (isPlayer(cid) == true) then --checking if player is online
if getPlayerSoul(cid) > 5 then
doPlayerAddSoul(cid, -5)
doPlayerSendCancel(cid, "Removed 5 soul Points.")
addEvent(checking, 3 * 1000)
else
end
else
doTeleportThing(cid, {x = xxxx, y = xxxx, z = xxxx})
doPlayerSendCancel(cid, "You have not enough soul points, go hunt to get them.")
end
return true
end
Trzeba by było także sprawdzić czy gracz stoi dalej na tej kratce, jeżeli nie to dać stopEvent.
Rep++