• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent "Upgrade weapon by killing monsters!" v2.0

I know what needs to be done, but I am still amateur to this stuff, I used to know a little bit back in the 7.6 days but even then I only understood code, never really went about making my own program or scripts from scratch....

I can tell you this tho, I will work on fixing this for my server and when I get it working I will post my script and link here, but its just gonna be the same script altered, the problem is in this line...

HTML:
if (string.lower(ignore_monsters) == "no" or isInArray(monsters, getCreatureName(target)) == TRUE) and string.lower(ignore_monsters) == "yes" then

No one see's anything wrong with this line?

Plus like I said it was never made to actually count the kills

Try adding something like this to it

HTML:
    local killadvance = 100 --amount of kills needed to advance weapon
    local killsave = 15010 -- storage value where kills are saved

    if (getPlayerStorageValue(cid, killsave) < 0) then
    setPlayerStorageValue(cid,killsave, 0)
    end
    setPlayerStorageValue(cid, killsave, getPlayerStorageValue(cid, 14059) + 1)
    if getPlayerStorageValue(cid,killsave) == killadvance then

Maybe that can inspire someone who knows better than I or maybe help point someone in the right direction... If not then when I can get to that then I will help for the community, would be a great script to help rpg servers very much

P.S. Shoutout and thanks to Limos for helping show me how to count kills :D
 
Let me know if you figure it out please! :D <3

I know what needs to be done, but I am still amateur to this stuff, I used to know a little bit back in the 7.6 days but even then I only understood code, never really went about making my own program or scripts from scratch....

I can tell you this tho, I will work on fixing this for my server and when I get it working I will post my script and link here, but its just gonna be the same script altered, the problem is in this line...

HTML:
if (string.lower(ignore_monsters) == "no" or isInArray(monsters, getCreatureName(target)) == TRUE) and string.lower(ignore_monsters) == "yes" then

No one see's anything wrong with this line?

Plus like I said it was never made to actually count the kills

Try adding something like this to it

HTML:
    local killadvance = 100 --amount of kills needed to advance weapon
    local killsave = 15010 -- storage value where kills are saved

    if (getPlayerStorageValue(cid, killsave) < 0) then
    setPlayerStorageValue(cid,killsave, 0)
    end
    setPlayerStorageValue(cid, killsave, getPlayerStorageValue(cid, 14059) + 1)
    if getPlayerStorageValue(cid,killsave) == killadvance then

Maybe that can inspire someone who knows better than I or maybe help point someone in the right direction... If not then when I can get to that then I will help for the community, would be a great script to help rpg servers very much

P.S. Shoutout and thanks to Limos for helping show me how to count kills :D
 
Back
Top