Darqneez
ShaC-Ohhhh
EDIT: See my post at the bottom
Hello, I've made a script but console gives me an error. Script should give player +1 storage value for every killed monster that is in config.
here's script:
That GlobalStorage is necessary, so dont delete it. Maybe I did a mistake, but global storage should work so: When using lever (in another script, there is a setglobalstoragevalue command) player gets global storage value 1, so he cant pull lever again until he kills pharaoh. After killing pharaoh script changes global storage value to -1, which is necessary to use lever.
here's error:
PS. I made in creaturescript.xml this:
in login.lua this:
and in every pharaoh.xml script this bettwen </flags> and <attack...>:
EDIT: See my post at the bottom
Hello, I've made a script but console gives me an error. Script should give player +1 storage value for every killed monster that is in config.
here's script:
Lua:
config = {
message = "You have deafeated me, but my brothers will take a revenge on you!",
amuthepmessage = "Impossible!",
pharaohs = {
"ashmunrah",
"dipthrah",
"mahrdis",
"morguthis",
"omruc",
"rahemos",
"thalas",
"vashresamun"
}
}
function onDeath(cid, corpse, killer)
if name == getCreatureName(config.pharaohs) then
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,20001,(getPlayerStorageValue(cid,20001))+1)
setGlobalStorageValue(cid,20002,-1)
elseif name == getCreatureName(amuthep) then
doCreatureSay(cid, config.amuthepmessage, TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,20001,(getPlayerStorageValue(cid,20001))+1)
setGlobalStorageValue(cid,20002,-1)
end
return TRUE
end
here's error:
Code:
[02/09/2010 17:28:24] [Error - CreatureScript Interface]
[02/09/2010 17:28:24] data/creaturescripts/scripts/pharaohs.lua:onDeath
[02/09/2010 17:28:24] Description:
[02/09/2010 17:28:24] (luaGetCreatureName) Creature not found
PS. I made in creaturescript.xml this:
XML:
<event type="death" name="Pharaoh" event="script" value="pharaohs.lua"/>
Lua:
registerCreatureEvent(cid, "Pharaoh")
XML:
<script>
<event name="Pharaoh"/>
</script>
EDIT: See my post at the bottom
Last edited: