Jump to content
  • 0

Help about defpattern and check item


XenaNyx

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   8
  • Joined:  02/08/12
  • Last Seen:  

- 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
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   8
  • Joined:  02/08/12
  • Last Seen:  

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

Link to comment

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   8
  • Joined:  02/08/12
  • Last Seen:  

It's work !! and thx for helping.

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