Jump to content
  • 0

Disable Dead Branches


Question

Posted

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.

9 answers to this question

Recommended Posts

  • 1
Posted

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."; },{},{}
Posted

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

Posted (edited)

@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
Posted

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)

Posted

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

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