Jump to content
  • 0

Disable Dead Branches


jayriku12

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  06/25/12
  • Last Seen:  

I want to disable the use of dead branches on main maps, fields, and dungeons. The use of the dead branches will only be allowed on one map which will be used as a DB Room (If you have or know of any links please post them here)

 

Thanks in advance.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Easiest way is to edit the database entry (or copy into db/import/item_db.txt to avoid conflicts!):

604,Branch_Of_Dead_Tree,Dead Branch,11,50,,50,,,,,0xFFFFFFFF,63,2,,,,,,{ if (strcharinfo(3) == "your_map") { delitem 604,1; monster "this",-1,-1,"--ja--",-1,1,""; } else dispbottom "This item can't be used on your current map."; },{},{}
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:  

hello
i want to ask something
if i wanna enabled it on several map, around 8 to 10 only, how i write the script?
thank you

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  06/25/12
  • Last Seen:  

Thank you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

hmm there a little typo here.

as usable item this one will be deleted once you double click on it then runscript.

With this you trying to redelete a deadbranch when we are in a valid map, which could fail (if we only have 1 item qty in inventory).

and the else part will also make you lose an item.

A workarround will be to have a getitem in the else part, so when it's not usable you lose the item but gain another...

 

or another way to do it will be to use mapflag nobranch and only allow your map.

OnInterInit:

foreach(.@map$){ if(.@map$ != "myallowed mapname" ) setmapflag..;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

@lighta

item type 11 ( IT_DELAYCONSUME ) can be reuse again and again

you can try

update item_db_re set type = 11 where id = 501
and your red potion will becomes unlimited usage

item type IT_DELAYCONSUME is actually meant for itemskill

itemskill doesn't seem to work with item type 0 (IT_HEALING) or 2 (IT_USABLE), so itemskill has to use type 11

because of its unique characteristic of this item type

it has became a trick for us to use item type 11 for reusable items


to lessen the burden of making nobranch mapflag

open db\map-index.txt, find

^([a-z0-9_@-]*)$
replace with regular expression

\1	mapflag	nobranch
then there's only a few lines need to edit ... Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  06/25/12
  • Last Seen:  

I tried Euphy way it worked. 

 

With one Dead Branch it works, the item won't get deleted on other maps and will work on the map allowed.

 

now;

 

With the Bloody Branches, it won't summon the mvp on the allowed map if you only have one. You need 2, and it will take 2 of them to summon only one mvp monster.

 

also;

 

If you use the 12103 Bloody Branches on any other map it will take the item and you won't get it back plus the monster isn't allowed to be summoned on that current map.

 

(The text works on both 604 and 12103)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

update item_db_re set script = 'if (strcharinfo(3) == "prontera") { delitem 12103,1; monster "this",-1,-1,"--ja--",-3,1,""; } else dispbottom "This item can\'t be used on your current map.";', type = 11 where id = 12103;
no idea why you say not working

make sure you have change the item type from 2 to 11

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   0
  • Joined:  06/25/12
  • Last Seen:  

Thanks, now working.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

nice, yeah I didn,t notice the itemtype change, (not that I would have recognize IT_DELAYCONSUME anyway =)

thx for the info, in this case yeah look perfect.

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...