Jump to content
  • 0

Request:Quest and warper npc


Question

Posted

anybody can make me a script like this?

this how it runs

click the npc..

the npc ask the player to get warped

2 options will pop(ok and cancel)

but before warping the npc will check the player if he has this item in his inventory ex. itemID (20207)

if yes the player will get teleported but the item will not be deleted.

if NO

the npc will ask to quest or not

same options will pop again

if yes the npc will require like 10 items with different amount

then ask if he got all the items

if yes the player will be given the itemID (20207)

if not the npc will say you didnt have all the requirement...

then closes.

thanks in advance:)

bump still need it T_T

4 answers to this question

Recommended Posts

Posted

@sai try this this should fix your error^^

prontera,127,110,5 script God's Realm 757,{
mes "Do you want to take Gods Items?";
if( select("Warp:Cancel") == 1 ){
if( countitem(20206) ){
 warp "poring_w02",100,194;
 end;
}
}else{
mes "Do you want to quest for the Item ?";
if( select("Okay:Cancel") == 1 ){
mes "You need those items";
for( set .@i,0; .@i < getarraysize( .Items ); set .@i,.@i + 1 ){
 mes .Items[ .@i + 1 ]+" x "+getitemname( .Items[.@i] );
 if( countitem( .Items[.@i] ) < .Items[ .@i + 1 ] )
  set .@close,1;
}
if( !.@close ){
 for( set .@i,0; .@i < getarraysize( .Items ); set .@i,.@i + 1 )
  delitem .Items[.@i],.Items[.@i + 1];
 getitem 20206,1;
 mes "You have made 1 "+getitemname( 20206 )+" .";
}
}
}
close;
OnInit:
setarray .Items[0],
   7442,200,
   1009,200,
   1059,200,
   7035,20,
   968,20,
   7020,20,
   7018,20,
   7297,20,
   7289,20,
   7295,20,
   7048,20,
   7513,10,
   7450,10,
   7562,10,
   670,10;
end;
}

Posted (edited)

try this

prontera,155,181,5 script Sample 757,{
mes "Warp to the destination ?";
if( select("Warp:Cancel") == 1 ){
if( countitem(20207) ){
 warp "prontera",155,181;
 end;
}
}else{
mes "Do you want to quest for the Item ?";
if( select("Okay:Cancel") == 1 ){
mes "You need those items";
for( set .@i,0; .@i < getarraysize( .Items ); set .@i,.@i + 1 ){
 mes .Items[ .@i + 1 ]+" x "+getitemname( .Items[.@i] );
 if( countitem( .Items[.@i] ) < .Items[ .@i + 1 ] )
  set .@close,1;
}
if( !.@close ){
 for( set .@i,0; .@i < getarraysize( .Items ); set .@i,.@i + 1 )
  delitem .Items[.@i],.Items[.@i + 1];
 getitem 20207,1;
 mes "You have made 1 "+getitemname( 20207 )+" .";
}
}
}
close;
OnInit:
setarray .Items[0],
607,10,
608,15,
7539,1,
512,120,
501,2,
502,3;
end;
}

Re-Edit : Fix Getitem Error

Edited by Emistry
Posted

trying this sir emistry

I got this error sir Emistry

error-2.jpg

this is the edited code

Flaris,127,110,5 script God's Realm 757,{
mes "Do you want to take Gods Items?";
if( select("Warp:Cancel") == 1 ){
if( countitem(20206) ){
 warp "poring_w02",100,194;
 end;
}
}else{
mes "Do you want to quest for the Item ?";
if( select("Okay:Cancel") == 1 ){
mes "You need those items";
for( set .@i,0; .@i < getarraysize( .Items ); set .@i,.@i + 1 ){
 mes .Items[ .@i + 1 ]+" x "+getitemname( .Items[.@i] );
 if( countitem( .Items[.@i] ) < .Items[ .@i + 1 ] )
  set .@close,1;
}
if( !.@close ){
 for( set .@i,0; .@i < getarraysize( .Items ); set .@i,.@i + 1 )
  delitem .Items[.@i],.Items[.@i + 1];
 getitem 20206;
 mes "You have made 1 "+getitemname( 20206 )+" .";
}
}
}
close;
OnInit:
setarray .Items[0],
   7442,200,
   1009,200,
   1059,200,
   7035,20,
   968,20,
   7020,20;
   7018,20;
   7297,20;
   7289,20;
   7295,20;
   7048,20;
   7513,10;
   7450,10;
   7562,10;
   670,10;
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...