Jump to content
  • 0

NPC Script Help


iamrence

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  07/25/13
  • Last Seen:  

It Delete's the Item in the list, even the requirements are not complete.

Can someone help me. i want it to not delete the items if the requirements are not complete.

-      script    Quest    -1,{

mes "Hi " + strcharinfo(0) + ", Your here for the quest.";
mes "This are the listed items i need";
mes "Make sure you have the real items or ill just delete them";
next;
mes "1000 TCG Card";
mes "50 Ancient Lips";
mes "50 Animal Gore";
mes "50 Ant Jaw";
mes "50 Million Zeny";
next;
mes "If you dont have all the items i will not give the item for the next quest";
next;
mes "It seems you have all the items for the quest. I will erase them and give you the item for the next quest.";
next;
if(countitem(7227)<1000 || countitem(1054)<50 || countitem(702)<50 || countitem(1014)<50 || Zeny <50000000)
    delitem 7227,1000;
    delitem 1054,50;
    delitem 702,50;
    delitem 1014,50;
    set zeny,zeny-50000000;
    getitem 6156,1;
    close;
}

 

It Delete's the Item in the list, even the requirements are not complete.

Can someone help me. i want it to not delete the items if the requirements are not complete.

Edited by Patskie
Change to code
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

missing 1 right curlys at the last line this > }

 

-      script    Quest    -1,{
mes "Hi " + strcharinfo(0) + ", Your here for the quest.";
mes "This are the listed items i need";
mes "Make sure you have the real items or ill just delete them";
next;
mes "1000 TCG Card";
mes "50 Ancient Lips";
mes "50 Animal Gore";
mes "50 Ant Jaw";
mes "50 Million Zeny";
next;
mes "If you dont have all the items i will not give the item for the next quest";
next;
mes "It seems you have all the items for the quest. I will erase them and give you the item for the next quest.";
next;
if ( countitem(7227)<1000 || countitem(1054)<50 || countitem(702)<50 || countitem(1014)<50 || Zeny <50000000 ) {
    mes "You don't have requirements";
    close;
}
delitem 7227,1000;
delitem 1054,50;
delitem 702,50;
delitem 1014,50;
set zeny,zeny-50000000;
getitem 6156,1;
close;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Change 

if(countitem(7227)<1000 || countitem(1054)<50 || countitem(702)<50 || countitem(1014)<50 || Zeny <50000000)

to : 

if(countitem(7227)<1000 || countitem(1054)<50 || countitem(702)<50 || countitem(1014)<50 || Zeny <50000000) end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  07/25/13
  • Last Seen:  

hey Sir. thanks it works.

but.

can you help again.

 

if the player doesnt have the right requirements.
can it say, you dont have the right items.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Change :

if(countitem(7227)<1000 || countitem(1054)<50 || countitem(702)<50 || countitem(1014)<50 || Zeny <50000000) end;

to :

if(countitem(7227)<1000 || countitem(1054)<50 || countitem(702)<50 || countitem(1014)<50 || Zeny <50000000) {
            mes "You don't have the right items";
            close;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  07/25/13
  • Last Seen:  

it didn't work sir. The npc doesnt show when i change.

if(countitem(7227)<1000 || countitem(1054)<50 || countitem(702)<50 || countitem(1014)<50 || Zeny <50000000) {
mes "You don't have the right items";
close;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Show error

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  07/25/13
  • Last Seen:  

missing 1 right curlys at the last line this > }

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