Jump to content
  • 0

Question

Posted (edited)

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

2 answers to this question

Recommended Posts

  • 0
Posted

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

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