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

Creaturescript Not work

esker

New Member
Joined
Oct 11, 2009
Messages
17
Reaction score
0
hello
i need a script to when you kill a monster execute this
doPlayerSetStorageValue(cid, 65000, getPlayerStorageValue(cid, 65000) + 1)

I tried it

function onDeath(cid, lastHitKiller, mostDamageKiller)
doPlayerSetStorageValue(mostDamageKiller, 65001, getPlayerStorageValue(cid, 65001) + 1)
end
return TRUE
<event type="death" name="troll" event="script" value="troll.lua"/>
did not work
the error :
[Error - CreatureScript Interface]
data/creaturescripts/scripts/troll.lua:onDeath
Description:
(luaDoCreatureSetStorage) Creature not found

pls help me
 
hello, now the script work

i need a script to when you kill troll,troll sland,..... execute
this script is only troll

local storage = 65000

function onKill(cid, target, lastHit)
if isPlayer(cid) and isMonster(target) and getCreatureName(string.lower(target)) == 'troll' then
if getPlayerStorageValue(cid, 65000) >= 0 then
doCreatureSetStorage(cid, storage, getCreatureStorage(cid, storage)+1)
end
end
return true
end
 
Last edited:
Back
Top