EvilSkillz
Back
listen
i need a chest change my vocation but depends on rebirth too and lower reb
i made this script
it's works when i click on chest
it's down my rebirth successfully
but the problem it's never change vocation
also it's never give me warning if i'm lower rebirth to use it
it's keep let me make rebirth
i don't need it buy storage cuz i need players use it a lot of time even when they get the rebirth
this is all
it's works good with lower the rebirth counts the problem it's never change vocation
and never give me the refuse msg
"only Vocations with 10 rebirth may use this chest"
why?
also got this error
i need a chest change my vocation but depends on rebirth too and lower reb
i made this script
it's works when i click on chest
it's down my rebirth successfully
but the problem it's never change vocation
also it's never give me warning if i'm lower rebirth to use it
it's keep let me make rebirth
i don't need it buy storage cuz i need players use it a lot of time even when they get the rebirth
this is all
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isDruid(cid) then
if getPlayerStorageValue(cid, 31337, 10) then
doPlayerSetVocation(cid, 2)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "your vocation has been changed to druid.")
else
doCreatureSetStorage(cid, 31337, 5)
doRemoveCreature(cid)
end
if getPlayerStorageValue(cid, 31337) < 10 then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "only Vocations with 10 rebirth may use this chest.")
end
return true
end
end
and never give me the refuse msg
"only Vocations with 10 rebirth may use this chest"
why?
also got this error
Code:
[12/06/2013 18:38:21] GOD Otswe has logged in.
[12/06/2013 18:38:23] [Error - Action Interface]
[12/06/2013 18:38:24] data/actions/scripts/quests/druidchest.lua:onUse
[12/06/2013 18:38:24] Description:
[12/06/2013 18:38:24] (luaGetCreatureStorage) Creature not found
[12/06/2013 18:38:24] GOD Otswe has logged out.
[12/06/2013 18:38:24] [Error - Action Interface]
[12/06/2013 18:38:24] data/actions/scripts/quests/druidchest.lua:onUse
[12/06/2013 18:38:24] Description:
[12/06/2013 18:38:24] (luaGetCreatureStorage) Creature not found
[12/06/2013 18:38:24] [Error - Action Interface]
[12/06/2013 18:38:24] data/actions/scripts/quests/druidchest.lua:onUse
[12/06/2013 18:38:24] Description:
[12/06/2013 18:38:24] data/actions/scripts/quests/druidchest.lua:10: attempt to compare boolean with number
[12/06/2013 18:38:24] stack traceback:
[12/06/2013 18:38:24] data/actions/scripts/quests/druidchest.lua:10: in function <data/actions/scripts/quests/druidchest.lua:1>
[12/06/2013 18:38:25] GOD Otswe has logged in.
Code:
[12/06/2013 18:40:39] [Error - Action Interface]
[12/06/2013 18:40:39] data/actions/scripts/quests/druidchest.lua:onUse
[12/06/2013 18:40:39] Description:
[12/06/2013 18:40:39] (luaGetCreatureStorage) Creature not found
[12/06/2013 18:40:39] GOD Otswe has logged out.
[12/06/2013 18:40:39] [Error - Action Interface]
[12/06/2013 18:40:39] data/actions/scripts/quests/druidchest.lua:onUse
[12/06/2013 18:40:39] Description:
[12/06/2013 18:40:39] (luaGetCreatureStorage) Creature not found
[12/06/2013 18:40:39] [Error - Action Interface]
[12/06/2013 18:40:39] data/actions/scripts/quests/druidchest.lua:onUse
[12/06/2013 18:40:39] Description:
[12/06/2013 18:40:39] data/actions/scripts/quests/druidchest.lua:10: attempt to compare boolean with number
[12/06/2013 18:40:39] stack traceback:
[12/06/2013 18:40:39] data/actions/scripts/quests/druidchest.lua:10: in function <data/actions/scripts/quests/druidchest.lua:1>
Last edited: