Jump to content
  • 0

NPC can give 2 or more rewards if more items available?


Currently

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.03
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

I currently have this NPC.

http://pastebin.com/evhxVcdx

Players have been asking me to make the trading much faster.

Therefore, I'm asking if it's possible for any of you helpful moderators or people to help me out with this.

To make the trading "Blue cards" for "Heaven set Boxes" much faster.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

/bo

set .@dreams_box, 0;	// multi Trade Heaven Box for Dream Box ? (1: yes / 0: disabled)
set .@multi_heaven, 1;	// multi trade blue card to heaven box ? (1: yes / 0: disabled)

//============================================================
hc_pront,164,166,4	script	Heaven Dungeon Info	510,{
//===== Config: ==============================================
set .npcname$,"[^FF0000 Heaven Set ^000000]"; //Change to whatever you want the NPC name to be
setarray .reqid[1],6011,6012,6013,6015,6016,6017,6018,6019,6054,6055,6056,6057,6058,6059,6236,6485,6486,6487; //Item IDs for the items, required for item checks
setarray .reqn$[1],"Blue B Card","Blue C Card","Blue J Card","Blue M Card","Blue Q Card","Blue T Card","Blue V Card","Blue Z Card","Blue 6 Card","Character Week Card","Character Year Card","Character Lee Card","Character Ben Card","Character Project  Card","Blue 7 Card","Blue 2 Card","Blue 0 Card","Blue 1 Card"; //These are names of the required items, for the dialogue
setarray .reqa[1],1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; //These are how many of each item is required
set .prize,25002; //Change this to the Item ID of the item reward
set .prizen$,"Heaven Set Box"; //Change this to the name of your reward
set .prizea,1; //Change this to the amount of the prize item
set .zeny,0; //Amount of zeny for quest (set to 0 to disable)
set .@dreams_box, 0;	// multi Trade Heaven Box for Dream Box ? (1: yes / 0: disabled)
set .@multi_heaven, 1;	// multi trade blue card to heaven box ? (1: yes / 0: disabled)

L_QUEST:
mes .npcname$;
mes "Hah! Hello there "+strcharinfo(0);
next;

mes .npcname$;
mes "I don't get many visitors, so I assume you're after my legendary ^FF0000"+.prizen$+"^000000?";
menu "Of course",-,"What is Heaven Set?",L_EXIT,"^FF0000Trade my Heaven Box for Dream Box^000000",dreambox;

next;
mes .npcname$;
mes "Great! I love business. I can make you a ^FF0000"+.prizen$+"^000000, but only if you bring me the materials required.";
next;

mes .npcname$;
mes "Would you like me to make one for you?";
menu "Yes",-,"No",L_EXIT;
next;

if( .@multi_heaven ) {
	mes .npcname$;
	mes "First, how much ^FF0000"+.prizen$+"^000000 do you like to do ?";
	if( input( .@num_item, 1, 1000 ) != 0 ) {
		mes "Wrong number.";
		close;
	}
	next;
}
else
	set .@num_item, 1;
mes .npcname$;
mes "I'll need the following:";
for (set .@x,1; .@x < getarraysize(.reqid); set .@x,.@x + 1)
	mes ( .reqa[.@x] * .@num_item ) +" ^FF0000"+.reqn$[.@x]+"^000000";

if (.zeny > 0)
mes ( .zeny * .@num_item ) +" ^FF0000Zeny^000000";

next;
mes .npcname$;
mes "Do you have those items?";
menu "Yes",-,"No",L_EXIT;

next;
mes .npcname$;
for (set .@x,1; .@x < getarraysize(.reqid); set .@x,.@x + 1) {
	if(countitem(.reqid[.@x]) >= .reqa[.@x] * .@num_item) {mes "You've got enough ^00FF00"+.reqn$[.@x]+"^000000";} else {mes "You need more ^FF0000"+.reqn$[.@x]+"^000000";}
}
if (.zeny > 0) {
	if (Zeny < .zeny * .@num_item) {mes "You're missing ^FF0000Zeny^000000";}
	else {mes "You've got enough ^00FF00Zeny^000000";}
}
next;

mes .npcname$;
mes "Would you like to complete the quest?";
menu "Yes please!",-,"No Thanks",L_EXIT;
next;

for (set .@x,1; .@x < getarraysize(.reqid); set .@x,.@x + 1) {
	if(countitem(.reqid[.@x]) < .reqa[.@x] * .@num_item) goto L_EXIT2;
}
if (.zeny > 0) {
	if (Zeny < .zeny * .@num_item) goto L_EXIT2;
}
mes .npcname$;
mes "Brilliant! Fantastic! Here you go.";
for (set .@x,1; .@x < getarraysize(.reqid); set .@x,.@x + 1) {
	delitem .reqid[.@x],.reqa[.@x] * .@num_item;
}
if (.zeny > 0) {
	set Zeny, Zeny - .zeny * .@num_item;
}
goto L_FINAL2;

dreambox:
next;
mes .npcname$;
if( .@dreams_box ) {
	mes "How much Heaven Set Boxes do you want ?";
	if( input( .@num_item, 1, 1000 ) != 0 ) {
		mes "Wrong number.";
		close;
	}
}
else
	set .@num_item, 1;
mes "Requirement:";
mes ( 50 * .@num_item ) +" Heaven Set Boxes.";
mes .@num_item +" C Grade Coin.";
mes .@num_item +" B Grade Coin.";
mes .@num_item +" A Grade Coin.";
menu "Trade.",-;

next;
if (countitem(25002) < 50 * .@num_item || countitem(6418) < .@num_item || countitem(6419) < .@num_item || countitem(6420) < .@num_item)  {
	mes .npcname$;
	mes "You do not have enough!";
	close;
} else {
	mes .npcname$;
	mes "Here you go!";
	getitem 13825,.@num_item;
	delitem 25002,50 * .@num_item;
	delitem 6418,.@num_item;
	delitem 6419,.@num_item;
	delitem 6420,.@num_item;
	close;
}

L_EXIT:
next;
mes .npcname$;
mes "Think about it as the Siege Set with no autocast skills.";
mes " ";
mes "It gives +40 all stats for armor, garment, and shoes.";

next;
mes "If you complete the set, you get extra +40 all stats!";
close;

L_EXIT2:
next;
mes .npcname$;
mes "I'm sorry, you don't have enough!";
close;

L_FINAL2:
next;
mes .npcname$;
mes "Brilliant! Fantastic! Here you go.";
getitem .prize,.@num_item;
close;

OnPCDieEvent:
if( strcharinfo(3) == "lhz_dun04" ) warp "hc_pront",163,194;
end;
}



hc_pront,145,191,5	script	Build Helper	542,{

waitingroom "Class Builds",0;
set .@npc$,"[Class Build]";

mes .@npc$;
mes "Hello. What build do you need help with?";
mes " ";
mes "^FF0000 Think other ways to improve it. ^000000";

switch(select("PvP Build:Etc Build")) {
	case 1:
		next;
		mes "^FF0000 This build requires SIEGE ITEMS from the Siege room or HEAVEN ITEMS to be successful.";
		menu "Default Build",-;

		next;
		mes .@npc$;
		mes "Use any 3 headgears with ^FF0000 Professional Bonus ^000000.";
		mes "Select ^FF0000 Dex + 75 , 10% Demi-Human resist & Regain 30% HP FOR MID & ANY BONUS FOR LOWER.";
		mes " ";
		mes "Slot them with either ^FF0000 Seyren Windsor Cards for STR, Kathryne Keyron for MATK, Grand Peco Cards for DEX.";
		next;

		mes .@npc$;
		mes "Siege Armor OR Heaven Armor. Slot it with ^FF0000 Angeling Card & 2 Gloom Under Night & A Grade Coin Enchantment^000000";
		mes " ";
		mes "^FF0000NOTE:^000000 Get an extra armor and slot it with 3 Gloom Under Night Cards & A Grade Coin Enchantment!";
		next;

		mes .@npc$;
		mes "Siege Mantue or Heaven Garment. Slot it with ^FF0000 4 Noxious CArds^000000";
		mes " ";
		mes "Siege Shoes or Heaven Shoes. Slot it with ^FF0000 3 Wild Rose Cards & A Grade Coin Enchantment^000000.";
		next;

		mes .@npc$;
		mes "Platinum Rings. Slot it with ^FF0000 8 Dreamworks Cards ^000000.";
		mes " ";
		mes "Siege Guard OR Platinum Shield. Slot it with ^FF0000 2 Horn Cards ^000000.";
		next;

		mes .@npc$;
		mes "Get Siege Weapons. Slot them with ^FF0000 2x Hydra Cards & 2x Turtle General Cards ^000000.";
		close;

	case 2:
		next;
		menu "Build for Heaven Dungeon Mobs.",-;

		next;
		mes .@npc$;
		mes "You need to be an Assassin cross for this to work out.";
		next;

		mes .@npc$;
		mes "Get any THREE headgears. Slot Upper and Middle Headgears with REGAIN item bonuses.";
		mes " ";
		mes "Get the REGAIN item bonuses from DreamworksRO Bonus.";
		next;

		mes .@npc$;
		mes "For the low headgear, slot it with Sacrifice item bonus.";
		next;

		mes .@npc$;
		mes "Buy a Brynhildr, slot it with Dokebi Card and 3 Egnigem Cenia.";
		mes " ";
		mes "Get the Nidhoggur's Shadow Garb MANTUE and slot it with 4 Marse cards.";
		next;

		mes .@npc$;
		mes "Get two combat knife. Slot them with 4 Turtle General Cards.";
		next;

		mes .@npc$;
		mes "This is the plan:";
		mes "Use Enchant Deadly Poison and Sacrifice. Then just melee them.";
		mes "You might get dispelled here and there but just use sacrifice!";
		close;
}
}

Edited by Capuche
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...