Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Oxxy (C) 2013 ;)
- */
- function script CustomQuest {
- set .@npc$, "["+getarg(0)+"]"; // NPC Header
- set .@text$, getarg(1); // Quest's text
- set .@yes_no_text$, getarg(2); // Another text
- set .@yes_no_menu$, getarg(3); // Menu Yes or No text
- set .@no_text$, getarg(4); // Text if you pressed No
- //set .@items_menu$, getarg(5); // Items menu (The last one should be Close or something like this) unused actually
- set .@oneItemText$, getarg(6); // Text that will be displayed when u chose item
- set .@yes_no_text1$, getarg(7); // Menu Yes or No(item creating)
- set .@item_id1, getarg(8); // Item ID 1
- set .@item_Amount1, getarg(9); // Item Amount 1
- set .@item_id2, getarg(10); // Item ID 2
- set .@item_Amount2, getarg(11); // Item Amount 2
- set .@item_id3, getarg(12); // Item ID 3
- set .@item_Amount3, getarg(13); // Item Amount 3
- set .@item_id4, getarg(14); // Item ID 4
- set .@item_Amount4, getarg(15); // Item Amount 4
- set .@item_id5, getarg(16); // Item ID 5
- set .@item_Amount5, getarg(17); // Item Amount 5
- set .@item_id6, getarg(18); // Item ID 6
- set .@item_Amount6, getarg(19); // Item Amount 6
- set .@Zeny, getarg(20); // Zeny required for quest
- // 0 - No zeny required
- set .@oneItemReward, getarg(21); // Reward Item ID
- set .@oneItemAmount, getarg(22); // Reward Item Amount
- mes .@npc$;
- mes .@text$;
- mes .@yes_no_text$;
- next;
- if(select(.@yes_no_menu$) == 2)
- {
- next;
- mes .@npc$;
- mes .@no_text$;
- close;
- }
- mes .@npc$;
- mes .@oneItemtext$;
- mes "You will need: ";
- if(.@item_id1 && .@item_Amount1)
- mes ""+.@item_Amount1+" "+getitemname(.@item_id1)+"";
- if(.@item_id2 && .@item_Amount2)
- mes ""+.@item_Amount2+" "+getitemname(.@item_id2)+"";
- if(.@item_id3 && .@item_Amount3)
- mes ""+.@item_Amount3+" "+getitemname(.@item_id3)+"";
- if(.@item_id4 && .@item_Amount4)
- mes ""+.@item_Amount4+" "+getitemname(.@item_id4)+"";
- if(.@item_id5 && .@item_Amount5)
- mes ""+.@item_Amount5+" "+getitemname(.@item_id5)+"";
- if(.@item_id6 && .@item_Amount6)
- mes ""+.@item_Amount6+" "+getitemname(.@item_id6)+"";
- mes .@yes_no_text1$;
- if(select(.@yes_no_menu$) == 2)
- {
- mes .@no_text$;
- close;
- }
- if(.@item_id1 && .@item_Amount1)
- {
- if(countitem(.@item_id1) < .@item_Amount1)
- {
- next;
- mes .@npc$;
- mes "You don't have enough "+getitemname(.@item_id1)+".";
- close;
- }
- delitem .@item_id1, .@item_Amount1;
- }
- if(.@item_id2 && .@item_Amount2)
- {
- if(countitem(.@item_id2) < .@item_Amount2)
- {
- next;
- mes .@npc$;
- mes "You don't have enough "+getitemname(.@item_id2)+".";
- close;
- }
- delitem .@item_id2, .@item_Amount2;
- }
- if(.@item_id3 && .@item_Amount3)
- {
- if(countitem(.@item_id3) < .@item_Amount3)
- {
- next;
- mes .@npc$;
- mes "You don't have enough "+getitemname(.@item_id3)+".";
- close;
- }
- delitem .@item_id3, .@item_Amount3;
- }
- if(.@item_id4 && .@item_Amount4)
- {
- if(countitem(.@item_id4) < .@item_Amount4)
- {
- next;
- mes .@npc$;
- mes "You don't have enough "+getitemname(.@item_id4)+".";
- close;
- }
- delitem .@item_id4, .@item_Amount4;
- }
- if(.@item_id5 && .@item_Amount5)
- {
- if(countitem(.@item_id5) < .@item_Amount5)
- {
- next;
- mes .@npc$;
- mes "You don't have enough "+getitemname(.@item_id5)+".";
- close;
- }
- delitem .@item_id5, .@item_Amount5;
- }
- if(.@item_id6)
- {
- if(countitem(.@item_id6) < .@item_Amount6)
- {
- next;
- mes .@npc$;
- mes "You don't have enough "+getitemname(.@item_id6)+".";
- close;
- }
- delitem .@item_id6, .@item_Amount6;
- }
- if(.@Zeny)
- {
- if(Zeny < .@Zeny)
- {
- next;
- mes .@npc$;
- mes "You don't have enough "+(.@Zeny - Zeny)+".";
- close;
- }
- set Zeny, Zeny - .@Zeny;
- }
- next;
- mes .@npc$;
- mes "Here's your item!";
- getitem .@oneItemReward, .@oneItemAmount;
- close;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement