Jump to content
  • 0

PvP & GvG Potion


sloowy

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   1
  • Joined:  06/08/13
  • Last Seen:  

Hello, i used this script to make pvp & woe potion

Quote

if (strcharinfo(3) == "pvp_y_2-2") itemheal rand(330,410),0;

i wanna ask, is possible to change "pvp_y_2-2"(the trigger) into mapflap or every map that have mapflag pvp or mapflag gvg?

so, i don't need to make another script for another pvp or gvg map.

thank you.

 

i mean, i want to make potion that only can be used in pvp or gvg mapflag. sorry my english is so bad ?

 

*edit solved bymyself

for item

Quote

39997,PVP_HP_Pot,PVP HP Potion,,0,,30,,,,,0xFFFFFFFF,63,2,,,,,,{ callfunc "hp"; },{},{}


39998,PVP_SP_Potion,PVP SP Potion,,0,,30,,,,,0xFFFFFFFF,63,2,,,,,,{ callfunc "sppot"; },{},{}

 

for function

Quote

function    script    hp    {
if ( getmapflag( strcharinfo(3),mf_pvp,0 )) itemheal rand(330,410),0;
if ( getmapflag( strcharinfo(3),mf_gvg,0 )) itemheal rand(330,410),0;
specialeffect2 207;
end;
}

function    script    sppot    {
if ( getmapflag( strcharinfo(3),mf_pvp,0 )) itemheal 0,rand(40,65);
if ( getmapflag( strcharinfo(3),mf_gvg,0 )) itemheal 0,rand(40,65);
specialeffect2 208;
end;
}

 

Edited by sloowy
  • Love 1
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   1
  • Joined:  06/08/13
  • Last Seen:  

solved

for item

Quote

39997,PVP_HP_Pot,PVP HP Potion,,0,,30,,,,,0xFFFFFFFF,63,2,,,,,,{ callfunc "hp"; },{},{}


39998,PVP_SP_Potion,PVP SP Potion,,0,,30,,,,,0xFFFFFFFF,63,2,,,,,,{ callfunc "sppot"; },{},{}

 

for function

Quote

function    script    hp    {
if ( getmapflag( strcharinfo(3),mf_pvp,0 )) itemheal rand(330,410),0;
if ( getmapflag( strcharinfo(3),mf_gvg,0 )) itemheal rand(330,410),0;
specialeffect2 207;
end;
}

function    script    sppot    {
if ( getmapflag( strcharinfo(3),mf_pvp,0 )) itemheal 0,rand(40,65);
if ( getmapflag( strcharinfo(3),mf_gvg,0 )) itemheal 0,rand(40,65);
specialeffect2 208;
end;
}

Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

For this you can use also the db/import/item_noequip.txt to restrict it only on PvP and GvG maps.

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