I scripted my first npc and now I have the problem that I cant talk to the npc. Thats why I think there is a problem with the script. Could someone help me a little bit?
Spoiler
prontera,160,192,5 script Jellopy Trader 757,{
mes "Hello, I want to trade some Jellopys for various Items.";
next;
mes " I give you 1 Yggdrasilberry for 100 Jellopys, 20 Old Blue Boxes for 200 Jellopys and 20 Old Violet Boxes for 300 Jellopys.";
next;
menu "Yggdrasilberry",L_Yggdrasilberry,"Old Blue Box",L_OldBlueBox,"Old Violet Box",L_OldVioletBox,"Nevermind",L_Cancel;
L_Yggdrasilberry:
if( countitem(909) < 100 );
mes "You didnt have 100 "+getitemname( 909 );
else{
set .@Amount,( countitem(909) / 100 );
delitem 909,( .@Amount * 100 );
getitem 607,.@Amount;
mes "Done...you gained "+.@Amount+" "+getitemname(607);
}
close;
L_OldBlueBox:
if( countitem(909) < 200 );
mes "You didnt have 100 "+getitemname( 909 );
else{
set .@Amount,( countitem(909) / 200 );
delitem 909,( .@Amount * 200 );
getitem 603,( .@Amount * 20 );
mes "Done...you gained "+.@Amount+" "+getitemname(603);
}
close;
L_OldVioletBox:
if( countitem(909) < 300 );
mes "You didnt have 100 "+getitemname( 909 );
else{
set .@Amount,( countitem(909) / 300 );
delitem 909,( .@Amount * 300 );
getitem 617,( .@Amount * 20 );
mes "Done...you gained "+.@Amount+" "+getitemname(617);
}
close;
Question
bartsimpson1
Hello rathena Users,
I scripted my first npc and now I have the problem that I cant talk to the npc. Thats why I think there is a problem with the script. Could someone help me a little bit?
prontera,160,192,5 script Jellopy Trader 757,{
mes "Hello, I want to trade some Jellopys for various Items.";
next;
mes " I give you 1 Yggdrasilberry for 100 Jellopys, 20 Old Blue Boxes for 200 Jellopys and 20 Old Violet Boxes for 300 Jellopys.";
next;
menu "Yggdrasilberry",L_Yggdrasilberry,"Old Blue Box",L_OldBlueBox,"Old Violet Box",L_OldVioletBox,"Nevermind",L_Cancel;
L_Yggdrasilberry:
if( countitem(909) < 100 );
mes "You didnt have 100 "+getitemname( 909 );
else{
set .@Amount,( countitem(909) / 100 );
delitem 909,( .@Amount * 100 );
getitem 607,.@Amount;
mes "Done...you gained "+.@Amount+" "+getitemname(607);
}
close;
L_OldBlueBox:
if( countitem(909) < 200 );
mes "You didnt have 100 "+getitemname( 909 );
else{
set .@Amount,( countitem(909) / 200 );
delitem 909,( .@Amount * 200 );
getitem 603,( .@Amount * 20 );
mes "Done...you gained "+.@Amount+" "+getitemname(603);
}
close;
L_OldVioletBox:
if( countitem(909) < 300 );
mes "You didnt have 100 "+getitemname( 909 );
else{
set .@Amount,( countitem(909) / 300 );
delitem 909,( .@Amount * 300 );
getitem 617,( .@Amount * 20 );
mes "Done...you gained "+.@Amount+" "+getitemname(617);
}
close;
L_Cancel:
mes "Come back anytime!";
close;
end;
}
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.