Animera
* * * * *
everything is fixed atm.
Last edited:
doSendAnimatedText(cid, config.message, config.color)
doSendAnimatedText(getCreaturePosition(cid),config.message, config.color)
local config = {
message = "BOSS +1",
color = COLOR_WHITE,
bosses = { -- Monster Name, Storagevalue,
["Ra revenge"] = {storage=51001},
["warshabaal"] = {storage=51002},
["Seadevil"] = {storage=51003},
["Haunted dragon"] = {storage=51004},
["Thunder dragon"] = {storage=51005},
["green-eyes red dragon"] = {storage=51006},
["Chaos emperor dragon"] = {storage=51007},
["Vampire genesis"] = {storage=51008},
["dark ruler ha des"] = {storage=51009},
["Amidamaru"] = {storage=51010},
["Bason"] = {storage=51011},
["eliza faust"] = {storage=51012},
["fortress golem"] = {storage=51013},
["illusionist"] = {storage=51014},
["iron maiden jeanne"] = {storage=51015},
["kouki"] = {storage=51016},
["zenki"] = {storage=51017},
["lanancuras"] = {storage=51018},
["red eyes ultimate dragon"] = {storage=51019},
["silva"] = {storage=51020},
["zorc necrophadus"] = {storage=51021},
["King scorpion"] = {storage=51022},
["Bazir"] = {storage=51023},
["Apocal"] = {storage=51024},
["infernal"] = {storage=51025},
["Orshabaal"] = {storage=51026},
["Morgaroth"] = {storage=51027},
["verminor"] = {storage=51028},
["saggi the dark clown"] = {storage=51029},
},
}
function onKill(cid,target,lastHit)
local b = config.bosses[getCreatureName(target)]
function exp(cid)
setPlayerStorageValue(cid,b.storage,1)
doSendAnimatedText(getCreaturePosition(cid),config.message, config.color)
end
if b then
addEvent(exp, 2 * 1000, cid)
end
return true
end
You forgot to declare cid in the event, that's why.
Lua:local config = { message = "BOSS +1", color = COLOR_WHITE, bosses = { -- Monster Name, Storagevalue, ["Ra revenge"] = {storage=51001}, ["warshabaal"] = {storage=51002}, ["Seadevil"] = {storage=51003}, ["Haunted dragon"] = {storage=51004}, ["Thunder dragon"] = {storage=51005}, ["green-eyes red dragon"] = {storage=51006}, ["Chaos emperor dragon"] = {storage=51007}, ["Vampire genesis"] = {storage=51008}, ["dark ruler ha des"] = {storage=51009}, ["Amidamaru"] = {storage=51010}, ["Bason"] = {storage=51011}, ["eliza faust"] = {storage=51012}, ["fortress golem"] = {storage=51013}, ["illusionist"] = {storage=51014}, ["iron maiden jeanne"] = {storage=51015}, ["kouki"] = {storage=51016}, ["zenki"] = {storage=51017}, ["lanancuras"] = {storage=51018}, ["red eyes ultimate dragon"] = {storage=51019}, ["silva"] = {storage=51020}, ["zorc necrophadus"] = {storage=51021}, ["King scorpion"] = {storage=51022}, ["Bazir"] = {storage=51023}, ["Apocal"] = {storage=51024}, ["infernal"] = {storage=51025}, ["Orshabaal"] = {storage=51026}, ["Morgaroth"] = {storage=51027}, ["verminor"] = {storage=51028}, ["saggi the dark clown"] = {storage=51029}, }, } function onKill(cid,target,lastHit) local b = config.bosses[getCreatureName(target)] function exp(cid) setPlayerStorageValue(cid,b.storage,1) doSendAnimatedText(getCreaturePosition(cid),config.message, config.color) end if b then addEvent(exp, 2 * 1000, cid) end return true end
kind regards, Evil Hero.
I sense some bullshit here, if b worked inside exp function, why wouldn't cid do?
function onKill(cid,target,lastHit)
local config = {
message = "BOSS +1",
color = COLOR_WHITE,
bosses = { -- Monster Name, Storagevalue,
["Ra revenge"] = {storage=51001},
["warshabaal"] = {storage=51002},
["Seadevil"] = {storage=51003},
["Haunted dragon"] = {storage=51004},
["Thunder dragon"] = {storage=51005},
["green-eyes red dragon"] = {storage=51006},
["Chaos emperor dragon"] = {storage=51007},
["Vampire genesis"] = {storage=51008},
["dark ruler ha des"] = {storage=51009},
["Amidamaru"] = {storage=51010},
["Bason"] = {storage=51011},
["eliza faust"] = {storage=51012},
["fortress golem"] = {storage=51013},
["illusionist"] = {storage=51014},
["iron maiden jeanne"] = {storage=51015},
["kouki"] = {storage=51016},
["zenki"] = {storage=51017},
["lanancuras"] = {storage=51018},
["red eyes ultimate dragon"] = {storage=51019},
["silva"] = {storage=51020},
["zorc necrophadus"] = {storage=51021},
["King scorpion"] = {storage=51022},
["Bazir"] = {storage=51023},
["Apocal"] = {storage=51024},
["infernal"] = {storage=51025},
["Orshabaal"] = {storage=51026},
["Morgaroth"] = {storage=51027},
["verminor"] = {storage=51028},
["saggi the dark clown"] = {storage=51029},
},
}
local b = config.bosses[getCreatureName(target)]
function exp(cid, target)
setPlayerStorageValue(cid,b.storage,1)
doSendAnimatedText(getCreaturePosition(cid),config.message, config.color)
end
if b then
addEvent(exp, 2 * 1000, cid, target)
end
return true
end
addEvent(doSendAnimatedText, 2 * 1000, getCreaturePosition(cid),config.message, config.color)