Jump to content
  • 0

Help about defpattern and check item


Question

Posted (edited)

- script heal -1,{
if (countitem(29171) >= 1) {
defpattern 1, "([^:]+):.*s999*", "Full";
defpattern 1, "([^:]+):.*s111*", "ass";
activatepset 1;
percentheal 100,100; } else {
deletepset 1;
percentheal 100,100;
}

Full:
skilleffect 234,0;sc_start SC_CP_WEAPON,1800000,5;
skilleffect 235,0;sc_start SC_CP_SHIELD,1800000,5;
skilleffect 236,0;sc_start SC_CP_ARMOR,1800000,5;
skilleffect 237,0;sc_start SC_CP_HELM,1800000,5;
end;

ass:
skilleffect 361,0; sc_start SC_ASSUMPTIO,1800000,5;
end;
}

i have 2 characters

one have item 29171 in inventory and two don't have item

character one can receive buff from defpattern because have item 29171 in inventory

but character two if stand near character one can receive buff from defpattern too (character two don't have item 29171 in inventory)

i don't know why , someone can help me ?

Edited by ROZEN

3 answers to this question

Recommended Posts

Posted

prontera,155,181,5 script Sample 757,{
LabelOne:
percentheal 100,100;
end;

LabelTwo:
if( !countitem( 29171 ) ){
 dispbottom "You need 1 "+getitemname( 29171 )+" to use this.";
}else{
 skilleffect 34,0; sc_start SC_BLESSING,360000,10;
 skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
}
end;

OnInit:
defpattern 1, "Heal", "LabelOne";
defpattern 1, "Buff", "LabelTwo";
activatepset 1;
end;
}

  • Upvote 1
Posted · Hidden by XenaNyx, February 17, 2012 - i can fix by myself. thx for helping
Hidden by XenaNyx, February 17, 2012 - i can fix by myself. thx for helping


prontera,155,181,5 script Sample 757,{
LabelOne:
percentheal 100,100;
end;

LabelTwo:
if( !countitem( 29171 ) ){
 dispbottom "You need 1 "+getitemname( 29171 )+" to use this.";
}else{
 skilleffect 34,0; sc_start SC_BLESSING,360000,10;
 skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
}
end;

OnInit:
defpattern 1, "Heal", "LabelOne";
defpattern 1, "Buff", "LabelTwo";
activatepset 1;
end;
}

wow it's work

but if have count item 2 times can you fix this again ?

- script heal -1,{
if (countitem(29170) >= 1) {
if( !countitem( 29171 ) ){
dispbottom "You need 1 "+getitemname( 29171 )+" to use this.";
callfunc "ExpertBuff";
} else {
defpattern 1, "([^:]+):.*s999*", "Full";
defpattern 1, "([^:]+):.*s111*", "ass";
activatepset 1;
callfunc "ExpertBuff";
}
}else{
if( !countitem( 29171 ) ){
dispbottom "You need 1 "+getitemname( 29171 )+" to use this.";
callfunc "NormalBuff";
} else {
defpattern 1, "([^:]+):.*s999*", "Full";
defpattern 1, "([^:]+):.*s111*", "ass";
activatepset 1;
callfunc "NormalBuff";
}
}
Full:
skilleffect 234,0;sc_start SC_CP_WEAPON,1800000,5;
skilleffect 235,0;sc_start SC_CP_SHIELD,1800000,5;
skilleffect 236,0;sc_start SC_CP_ARMOR,1800000,5;
skilleffect 237,0;sc_start SC_CP_HELM,1800000,5;
end;
ass:
skilleffect 361,0; sc_start SC_ASSUMPTIO,1800000,5;
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...