• 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!

Add tag to name when 500 frags

Eclipso

Mapper
Joined
Apr 12, 2017
Messages
96
Reaction score
6
hey guys i have a war ot and ineed a script that when a player reach 500 frags for example he gain [PRO] before his name :D
 
Solution
Know my grace :D
Lua:
function onThink(cid)
if getPlayerStorageValue (cid, 1234) == -1 then
if getPlayerFrags(cid) >= 500 then
setPlayerStorageValue (cid, 1234, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `name` = '[PRO] " .. getCreatureName(cid) .. " ' WHERE `id` = " .. getPlayerGUID(cid))
end
end
return true
end

You can use other function, this is to CREATURESCRIPTS and make sure you have getPlayerFrags function.
Know my grace :D
Lua:
function onThink(cid)
if getPlayerStorageValue (cid, 1234) == -1 then
if getPlayerFrags(cid) >= 500 then
setPlayerStorageValue (cid, 1234, 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `name` = '[PRO] " .. getCreatureName(cid) .. " ' WHERE `id` = " .. getPlayerGUID(cid))
end
end
return true
end

You can use other function, this is to CREATURESCRIPTS and make sure you have getPlayerFrags function.
 
Last edited:
Solution
Know my grace :D
Lua:
function onThink(cid)
if getPlayerFrags(cid) >= 500 then
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `name` = '[PRO] " .. getCreatureName(cid) .. " ' WHERE `id` = " .. getPlayerGUID(cid))
end
return true
end

You can use other function, this is to CREATURESCRIPTS and make sure you have getPlayerFrags function.
It will keep executing and kicking a player every second after reaching 500 frags.
 
would also be better to use a logout script to execute the change if they have a frag count of 500 or higher, and set a storage value so it won't happen again
using onThink and forcing kick would instantly (or almost instantly) kick the player and make them relog their account right after getting that 500th frag, making them forcefully leave combat which is unfair
 
Back
Top