Sorry for language in lua but the script is using local polish words.
When 1 player kill Orc, the orc transform into Orc Warrior - Its ok !
When 2 players kill Orc, the orc transform into TWO Orc warrior's - Its fail
When 3 players kill Orc, the orc transform into THREE Orc warrior's - Its fail
Anyone can optimalize the creaturescript code so as to: one,two,three... players can kill Orc and the Orc will be transformed into Orc Warrior ?
Rep++ I needed fast
PHP:
function onKill(cid, target)
local config =
{
["monster"] = "Orc",
["efekt"] = 120,
["losowe"] = 0,
["ilelosowanych"] = 0,
["monstercreate"] = "Orc Warrior"
}
local createmonster =
{
[1] = "---",
[2] = "---",
[3] = "---"
}
if isMonster(target) == true and getCreatureName(target) == config.monster then
if config.losowe == 1 then
local rand = math.random(1,config.ilelosowanych)
doSummonCreature(createmonster[rand], getThingPos(target))
doSendMagicEffect(getThingPos(target),config.efekt)
else
doSummonCreature(config.monstercreate, getThingPos(target))
doSendMagicEffect(getThingPos(target),config.efekt)
end
end
return true
end
When 1 player kill Orc, the orc transform into Orc Warrior - Its ok !
When 2 players kill Orc, the orc transform into TWO Orc warrior's - Its fail
When 3 players kill Orc, the orc transform into THREE Orc warrior's - Its fail
Anyone can optimalize the creaturescript code so as to: one,two,three... players can kill Orc and the Orc will be transformed into Orc Warrior ?
Rep++ I needed fast