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

CreatureEvent Top frags script

GM Denniz

Website- Designer- Mapper
Joined
Jan 1, 2012
Messages
62
Reaction score
2
Location
Stockholm
This Work trust me

My Friends Script

1 STEP. Go To creaturescripts/scripts/

Create 1 File topfrags.php

Lua:
function onKill(cid, target, lastHit)
if isPlayer(target) then
 db.executeQuery("UPDATE `players` SET `frags` = `frags` + 1 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
end
return true
end

2 STEP. Go now in creaturescripts/scripts/login.lua add

Lua:
registerCreatureEvent(cid, "TopFrags")

3 STEP. Go now in creaturescripts.xml and add

Lua:
    <event type="kill" name="TopFrags" event="script" value="topfrags.lua"/>
 
Last edited:
If it's your friends script then why should we give you reputation?
 
Critico is right, u should use storage instead of executing unnecessary queries
 
I doubt that you're friend with widnet. :p

There's no need with an extra field in players table and the script is unnecessary aswell.
 
function onThink(interval, lastExecution) for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(name)
doSendMagicEffect(getPlayerPosition(cid), 27)
doSendAnimatedText(getPlayerPosition(cid), "Top Frager", TEXTCOLOR_RED)
end
end
return true
end

Work?
 
rewrite the script Correctly please , it gives me error when i kill someone
 
Back
Top