Jump to content
  • 0

De-Refine NPC


uDe

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

Can someone help me with this script?

prontera,38,318,6    script    Derefiner    85,{
   set .@npc$,"[ Derefiner ]";
   mes .@npc$;
   mes "Hi !! I can de-refine your item";
   mes "but you need to pay me 10 Poring Coin for each level of de-refiner service";
   next;
//    the next line "setarray" is to store the item ID of the character. Because player with their own hexed client ( aka. hacker ) might change equipment during the talk to npc
   setarray @equip[1],getequipid(1),getequipid(2),getequipid(3),getequipid(4),getequipid(5),getequipid(6),getequipid(7),getequipid(8),getequipid(9),getequipid(10);
//    store the equipment placement so I can optimize the script
   setarray .@a[1],256,16,32,2,4,64,8,128,512,1;
   select(getequipname(1),getequipname(2),getequipname(3),getequipname(4),getequipname(5),getequipname(6),getequipname(7),getequipname(8),getequipname(9),getequipname(10));
       if ( !getequipisequiped(@menu) ) {
           mes .@npc$;
           mes "There's nothing equipped there...";
           close; }
       if (countitem(7539) < 10) {
           mes .@npc$;
           mes "You don't have enough Poring Coin";
           close; }
       if ( getequiprefinerycnt(@menu) > 10 || getequiprefinerycnt(@menu) == 0 ) {
           mes .@npc$;
           mes "This item cannot be de-refine.";
           close; }
   //    now we make a check on them ... 
       if ( getequipid(@menu) != @equip[@menu] ) {
           mes .@npc$;
           mes "Do you think I am that stupid?";
           mes "You have changed the item !!";
           mes "Get lost !!";
           close; }
   atcommand "@refine "+ .@a[@menu] +" -1";
   delitem 7539,10;
   mes .@npc$;
   mes "Your item has de-refined successfully";
   close;
}

Even I have more than 10 Poring Coins. It's still detect that my Poring Coin didn't enough. I don't see any error from Map-Server.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

It's working here.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

It's working here.

rCg2V.jpg

I still can't de-refine and again, no error from map-server. Is there something I'd miss?

Edited by uDe
Link to comment
Share on other sites


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

Thank you Emistry! /no1

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