Jump to content
  • 0

Item Bonuses on specific maps


Linkin Park

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

I want to know if it's possible via scripting to have item bonuses on specific maps only? For example when PlayerA from the guildA entered the castle prtg_cas01, bonuses will be given like 'bonus bAllStats,3;' or any other item bonuses inside the doc/item_bonus.txt?

Bonuses will be given to all the guild members who owns the castle.

Edited by RaGERO
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   3
  • Joined:  07/12/12
  • Last Seen:  

Possible I think.

You can use onpcloadmap event with possibility of using codes from food buffs to generate stats?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

But i wanted to use the bonuses from the item_bonus.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Possible I think.

You can use onpcloadmap event with possibility of using codes from food buffs to generate stats?

But i wanted to use the bonuses from the item_bonus.txt

You're still going to have to use some sort of onpcloadmap event label then for bonuses.. give the food effects for stats, etc. and then any other skill like assumption for defense, etc.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

Then I guess the answer is it's not '100%' possible. The item_bonus.txt is flexible unlike using the stat foods or the skills for defenses.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

You can make it like this on your itemscript.

if(strcharinfo(3)=="partg_cas01") bonus bAllStats, 3;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

Try this in combination with OnPCLoadMap

*autobonus <bonus script>,<rate>,<duration>{,<flag>,{<other script>}};
*autobonus2 <bonus script>,<rate>,<duration>{,<flag>,{<other script>}};
*autobonus3 <bonus script>,<rate>,<duration>,<skill id>,{<other script>};
*autobonus3 <bonus script>,<rate>,<duration>,"<skill name>",{<other script>};

These commands are meant to be used in item scripts. They will probably work
outside item scripts, but the bonus will not persist for long. They, as
expected, refer only to an invoking character.

What these commands do is 'attach' a script to the player which will get
executed on attack (or when attacked in the case of autobonus2).

Rate is the trigger rate of the script (1000 = 100%).

Duration is the time that the bonus will last for since the script has triggered.
The optional argument 'flag' is used to classify the type of attack where the script
can trigger (it shares the same flags as the bAutoSpell bonus script):

Range criteria:
BF_SHORT:  Trigger on melee attack
BF_LONG:   Trigger on ranged attack
Default:   BF_SHORT+BF_LONG

Attack type criteria:
BF_WEAPON: Trigger on weapon skills
BF_MAGIC:  Trigger on magic skills
BF_MISC:   Trigger on misc skills
Default:   BF_WEAPON

Skill criteria:
BF_NORMAL: Trigger on normal attacks
BF_SKILL:  Trigger on skills
default:   If the attack type is BF_WEAPON (only) BF_NORMAL is used,
 otherwise BF_SKILL+BF_NORMAL is used.

The difference between the optional argument 'other script' and the 'bonus script' is that,
the former one triggers only when attacking(or attacked) and the latter one runs on
status calculation as well, which makes sure, within the duration, the "bonus" that get
lost on status calculation is restored. So, 'bonus script' is technically supposed to accept
"bonus" command only. And we usually use 'other script' to show visual effects.

In all cases, when the script triggers, the attached player will be the one
who holds the bonus. There is currently no way of knowing within this script
who was the other character (the attacker in autobonus2, or the target in
autobonus and autobonus3).

//Grants a 1% chance of starting the state "all stats +10" for 10 seconds when
//using weapon or misc attacks (both melee and ranged skills) and shows a special
//effect when the bonus is active.
autobonus "{ bonus bAllStats,10; }",10,10000,BF_WEAPON|BF_MISC,"{ specialeffect2 EF_FIRESPLASHHIT; }";

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