ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
Here is the core of the talkaction that is not working properly
As of this code the player can repeatedly say the talkaction and get the bonus, how do I stop this and make it so if lvl 5-10 then set storage value to 5, if level 10 through 15, set to 10 and DO NOT repeat omg this is SOOOO frustrating
LUA:
if getPlayerStorageValue(cid, 25001) == 1 and getPlayerStorageValue(cid, 26001) < 5 and getPlayerLevel(cid) >= 5 and getPlayerLevel(cid) < 10 then
doPlayerPopupFYI(cid, "You prayed to the dwarven God and received a bonus to your max health and a bonus to your shielding stat.")
setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid) + 15))
doPlayerAddSkillTry(cid, 5, 75)
setPlayerStorageValue(cid, 26001, 5)
elseif getPlayerStorageValue(cid, 25001) == 1 and getPlayerStorageValue(cid, 26001) == 5 then
doPlayerPopupFYI(cid, "You prayed to the dwarven God and received a bonus to your max health and a bonus to your shielding stat.")
setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid) + 15))
doPlayerAddSkillTry(cid, 5, 100)
setPlayerStorageValue(cid, 26001, 10)
elseif getPlayerStorageValue(cid, 25001) == 1 and getPlayerStorageValue(cid, 26001) == 10 then
doPlayerPopupFYI(cid, "You prayed to the dwarven God and received a bonus to your max health and a bonus to your shielding stat.")
setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid) + 15))
doPlayerAddSkillTry(cid, 5, 125)
setPlayerStorageValue(cid, 26001, 15)
end
As of this code the player can repeatedly say the talkaction and get the bonus, how do I stop this and make it so if lvl 5-10 then set storage value to 5, if level 10 through 15, set to 10 and DO NOT repeat omg this is SOOOO frustrating