Jump to content
  • 0

Disable Item Consumtion for Particular Class in Particular Map


Question

Posted (edited)

Hi!

 

I need a script which will disable the consumption of particular items by all classes except few classes in certain maps with option to put extra maps, extra items and extra classes in the list.

 

Example :- Only CLASS - Novice will be able to use/consume ITEM - Novice Potion in MAP - pay_fild04. All other classes can't use it in this map.

Edited by Veracious

4 answers to this question

Recommended Posts

  • 1
Posted
678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class==Job_Assassin_Cross) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else if ( strcharinfo(3) != "bat_b01" && strcharinfo(3) != "prt_pvp" ) percentheal -100,-100; },{},{}

your should working, I'm just maniac

  • Upvote 2
Posted

Add a restriction on the item in db/item_db

Sample

501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,63,2,,,,,,{ if ( Class == Job_Novice && strcharinfo(3) == "pay_fild04" ) itemheal rand(45,65),0; },{},{}

only class novice on pay_fild04 is healed when using a red potion

  • Upvote 1
Posted

Add a restriction on the item in db/item_db

Sample

501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,63,2,,,,,,{ if ( Class == Job_Novice && strcharinfo(3) == "pay_fild04" ) itemheal rand(45,65),0; },{},{}

only class novice on pay_fild04 is healed when using a red potion

 

Wow, I never thought it could be done at item_db.txt...Thanks!

 

I've managed to make it for EDP as it can be miss used at BG/PVP maps for not getting killed from some one in pvp or to increase enemy team score in bg. All classes won't have effect of "death" using EDP in the maps BG - "bat_b01" & PVP - "prt_pvp".

 

Please correct me if i've made any mistakes in this script.

678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class==Job_Assassin_Cross) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else if ( Class != Job_Assassin_Cross && strcharinfo(3) == "bat_b01" || strcharinfo(3) == "prt_pvp" ) { percentheal 0,0; } else percentheal -100,-100; },{},{}
Posted
678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class==Job_Assassin_Cross) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else if ( strcharinfo(3) != "bat_b01" && strcharinfo(3) != "prt_pvp" ) percentheal -100,-100; },{},{}

your should working, I'm just maniac

 

 

Tested and its working, Thanks!

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