Jump to content
  • 0

Disable Dead Branch and Bloody Dead Branch


Question

Posted

Hello, I want to disable Dead Branch and Bloody Dead Branch on almost all maps and only use it on several maps

The script I already use are this

Quote

604,Branch_Of_Dead_Tree,Dead Branch,11,50,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ setarray .@mapname$[0], "prt_fild08", "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05", "06guild_06", "06guild_07", "06guild_08"; if (strcharinfo(3) == .@mapname$ ) { delitem 604,1; monster "this",-1,-1,"--ja--",-1,1,""; } else dispbottom "This item can't be used on your current map."; },{},{}
12103,Bloody_Dead_Branch,Bloody Branch,11,10000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ setarray .@mapname$[0], "prt_fild08", "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05", "06guild_06", "06guild_07", "06guild_08"; if (strcharinfo(3) == .@mapname$ ) { delitem 12103,1; monster "this",-1,-1,"--ja--",-3,1,""; } else dispbottom "This item can't be used on your current map."; },{},{}

but only in the first map i can only use DB and BDB; I can't use itu on the rest of the maps.
Maybe someone can help me fix this item script, or have alternative solutions. I already try add mapflag nobranch, but still failed.
Thanks in advance for your help.

2 answers to this question

Recommended Posts

  • 0
Posted

You are only checking the first element of the array.

The correct script should be:

{ setarray .@mapname$[0], "prt_fild08", "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05", "06guild_06", "06guild_07", "06guild_08"; set .@found,0; for(.@i = 0; .@i < getarraysize(.@mapname$); .@i++ ) { if(strcharinfo(3) == .@mapname$[.@i]) { set .@found,1; } } if (.@found == 1) { delitem 604,1; monster "this",-1,-1,"--ja--",-1,1,""; } else dispbottom "This item can't be used on your current map."; }

 

(Not tested, but it should work)

  • Upvote 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...