Jump to content
  • 0

help Cash Trader


Question

8 answers to this question

Recommended Posts

Posted

Since your in support section I'll point you in right direction so you can give it a shot OK,

Look into the following in the script_command.txt

Arrays

While / for

Switch

OnInit: (for config settings)

Getitemname

And... Think that's all you'll need

hello,

this script of mine is working just fine, but i want to shorten it. i'm not so familiar with the complexity of scripting. if someone could help me that would be nice.

thanks.

  • Upvote 1
Posted

Lol to learn anyways

If you still can get it or want further advice after you try then I'll help you more :)

^_^ i should've posted it on request instead. lolz. but thanks @Stolao. i'll try learning from those commands. (y)

Posted (edited)

thanks,

okay.. i manage to shrink it down somehow, but now i'm lost.i wan't to include the "attainable" cash on the trade-able item preview, and give reward specifically depending on the traded goods. 

 

prontera,144,174,3	script	Cash Trader	630,{	
	.@inventorylist_count = getarraysize( .itemID );
	.@cash_cost = getarraysize( .ccost );
	
	mes .n$;
	mes "What?";
	switch(select("Trade:Nothing")) {
		case 1:
			next;
			//getinventorylist; 
			for(set .@i,0; .@i < .@inventorylist_count; set .@i,.@i+1){
				if( !countitem( .itemID[.@i] ) <1 ){ 
					mes .n$;
					mes "Lemme see.....hmmm..";
					next;
					mes .n$;
					mes "You have an ^ff0000"+getitemname( .itemID[.@i] );
					mes "Are you sure you want to trade all of that?";
					switch(select("Yes Please:Nevermind.")) {
						case 1:
							end;
						case 2:
							next;
							mes .n$;
							mes "Goodbye then.";
						}
					
						
				}
			}
			mes "You don't have a cash trade-able item with you.";
			close;
		case 2:
			end;
		}
		

OnInit:
	set .n$,"[^80a4ffCash Trader^000000]";
	setarray .itemID[0],
		4357,4359,4361,4363,4367,4365,4407,4318,4403,4441,4128,4342,4372,4134,4352,4430,4374,
		4376,4408,4145,4324,4386,4330,4236,4302,31000,31001,4241,4277,4174,4284,4054,4183,4306,
		4198,4047,20163,4336,4250,4254,4207,4203,4197,4300,4179,4266,1415,1233,1365,1528,1228,
		2343,2421,1468,7513,1420,1524,13017,2700,1722,1130,2345,2678,2679,2659,12129,7566,7754,
		7451,7036,7562,7211,7169,7289,7290,7291,7292,7293,7294,7295,7296,7297,7510,7035,4123,
		4146,4131,4132,4305,4121,4135,4143,4142,4144,4276,4137,4147,4168,4148,1284,1745,1311,
		1561,13421,1646,1030,7020,1525,7018,1141,1236,1363,10018,2258,751,7109,5019,750,2507,7113;
		
	setarray .ccost[0],
		850,850,850,850,850,850,750,750,750,750,750,750,750,750,750,750,750,750,750,750,650,650
		,650,650,650,550,550,350,350,350,250,250,250,250,250,250,250,250,150,150,150,150,150,
		150,150,150,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
		20,20,15,15,15,15,15,15,15,15,15,15,15,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
		10,10,10,10,10,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4;	
	end;

}

also how can i make it so, that it will consume all the trade-able items, and multiply the cash rewards?


EDIT:

~ nevermind. ^_^ i figured it out. thanks.

Edited by GMxR

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