Jump to content
  • 0

Disable Dead Branch and Bloody Dead Branch


polong

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  32
  • Reputation:   0
  • Joined:  03/14/19
  • Last Seen:  

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.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   6
  • Joined:  08/01/12
  • Last Seen:  

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 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  32
  • Reputation:   0
  • Joined:  03/14/19
  • Last Seen:  

5 hours ago, Patotron said:

You are only checking the first element of the array.

(Not tested, but it should work)

thank you, it works

Link to comment
Share on other sites

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.

×
×
  • Create New...