• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Help with Anty bot trainers script

Gothric

New Member
Joined
Feb 6, 2010
Messages
264
Reaction score
1
can anyone help me with that script?


PHP:
function onThink(interval)
for _, cid in ipairs(getPlayersOnline()) do
if (getPlayerStorageValue(cid, 1337) == 1) then
doPlayerPopupFYI(cid, "W celu sprawdzenia twojej obecnosci przed komputerem zostales wywalony z train room.")
doTeleportThing(cid, {x=1100, y=1217, z=7})
setPlayerStorageValue(cid, 1337, 0)
db.executeQuery("UPDATE `players` SET `players`.`train` = 0 WHERE `players`.`id` = " .. getPlayerGUID(cid))
end
end
return TRUE
end


this script should tp player on trainers after 15 min training to the x y z position :d but how i can set place where are trainers
in this script?? it mean that in console i havent any bugs but in game it doesnt tp me :s becouse propably i must set position ( train room where players are training


ofc 15 minutes i set up in globalevents.xml
 
You must also set a move event that will add the storage value to the player in the training area when he steps into the booth to train. Have you done that?

Code:
function onThink(interval, lastExecution, thinkInterval)
	local position = { x = 1100, y = 1217, z = 7 }
	for _, cid in ipairs(getPlayersOnline()) do
		if(getPlayerStorageValue(cid, 1337) == 1) then
			doTeleportThing(cid, position)
			setPlayerStorageValue(cid, 1337, -1)
			doPlayerPopupFYI(cid, "W celu sprawdzenia twojej obecnosci przed komputerem zostales wywalony z train room.")
			db.executeQuery("UPDATE `players` SET `players`.`train` = 0 WHERE `players`.`id` = " .. getPlayerAccountId(cid) .. ".")
		end
	end
	return true
end
 
Back
Top