Jump to content

  •  

RiverStyx

Member Since 02 Jul 2014
Offline Last Active Jan 21 2015 06:33 AM
-----

Posts I've Made

In Topic: Specific options within a menu!

09 July 2014 - 10:12 PM

If I use

for (.@i=1; .@i< 26; .@i++){	.@menu$ = .@menu$ +""+ (getd("#AlootSet3ID"+.@i) != 0)?"Item ID "+getd("#AlootSet3ID"+.@i)+" - ("+getitemname(getd("#AlootSet3ID"+.@i))+")":"Add Item";} 

and

switch(select(.@menu$)){	//Do something here.}

can I change it to be somehting like..

 

 

.@menu$ = .@menu$ +""+ (getd("#AlootSet"+.@s+"ID"+.@i) != 0)?"Item ID "+getd("#AlootSet"+.@s+"ID"+.@i)+" - ("+getitemname(getd("#AlootSet"+.@s+"ID"+.@i))+")":"Add Item";

and

switch(select(.@menu$)){

will that let me then later (since there's 6 sets and 25 items per set) do..

 

		mes .NPCName$;		mes "Please input the item ID for what you want to autoloot.";		mes "Enter 0 if you wish to leave this option blank.";		input @input;		if (@input == 0)		{		next;		mes .NPCName$;		mes "Alright, deleted!";		set #AlootSet.@sID.@i,0;		next;		goto L_EasyMode;		close;		} else {		if(getiteminfo(@input,0) == -1)		{		next;		mes .NPCName$;		mes "Sorry, this is not a valid Item ID";		mes "Please try again.";		next;		goto L_EasyMode;		next;		} else {		next;		mes .NPCName$;		mes "Item ID "+@input+" ("+getitemname(@input)+") has been updated on your list.";		set #AlootSet+.@s+ID+.@i,@input;		next;		goto L_EasyMode;		}

 

Something like that, so I can just make one string for all 6 sets and 25 items per set?

 

Entire Code for this section.

Spoiler

 

Thank you in advance

 

 

Edit:

Or rather...

when the menu for what set they want to edit comes up, put the

for (.@s=1; .@s< 7; .@i++){
like,

 

mes .NPCName$;   mes "Alright, let's edit an existing set!";   mes "What set do you want to edit?";   mes "Empty/Unused Sets are shown with "Nothing" and can't be edited.";   if (#LootSet1$ == "") { set @menu$[1], "Nothing"; } else { set @menu$[1], #LootSet1$; }   if (#LootSet2$ == "") { set @menu$[2], "Nothing"; } else { set @menu$[2], #LootSet2$; }   if (#LootSet3$ == "") { set @menu$[3], "Nothing"; } else { set @menu$[3], #LootSet3$; }   if (#LootSet4$ == "") { set @menu$[4], "Nothing"; } else { set @menu$[4], #LootSet4$; }   if (#LootSet5$ == "") { set @menu$[5], "Nothing"; } else { set @menu$[5], #LootSet5$; }   if (#LootSet6$ == "") { set @menu$[6], "Nothing"; } else { set @menu$[6], #LootSet6$; }   next;   for (.@s=1; .@s<7; .@s++){   switch(select(@menu$[1],@menu$[2],@menu$[3],@menu$[4],@menu$[5],@menu$[6]))   {


In Topic: Little help with an if function.

09 July 2014 - 05:04 AM

You're a beautiful person, sir. I appreciate your insight.


In Topic: Little help with an if function.

09 July 2014 - 04:19 AM

Okay, thanks a ton with that, and as an additional question, is there a way to make it let you know what arguments failed the check? (let the player know)


In Topic: Specific options within a menu!

07 July 2014 - 01:59 AM

Completed without any further problems, with the help of the quesoph.

 

						switch (select ( #AlootSet3ID1 != 0? "Item ID "+#AlootSet3ID1+" - ("+getitemname(#AlootSet3ID1)+")": "Add Item",#AlootSet3ID2 != 0? "Item ID "+#AlootSet3ID2+" - ("+getitemname(#AlootSet3ID2)+")": "Add Item",#AlootSet3ID3 != 0? "Item ID "+#AlootSet3ID3+" - ("+getitemname(#AlootSet3ID3)+")": "Add Item",#AlootSet3ID4 != 0? "Item ID "+#AlootSet3ID4+" - ("+getitemname(#AlootSet3ID4)+")": "Add Item",#AlootSet3ID5 != 0? "Item ID "+#AlootSet3ID5+" - ("+getitemname(#AlootSet3ID5)+")": "Add Item",#AlootSet3ID6 != 0? "Item ID "+#AlootSet3ID6+" - ("+getitemname(#AlootSet3ID6)+")": "Add Item",#AlootSet3ID7 != 0? "Item ID "+#AlootSet3ID7+" - ("+getitemname(#AlootSet3ID7)+")": "Add Item",#AlootSet3ID8 != 0? "Item ID "+#AlootSet3ID8+" - ("+getitemname(#AlootSet3ID8)+")": "Add Item",#AlootSet3ID9 != 0? "Item ID "+#AlootSet3ID9+" - ("+getitemname(#AlootSet3ID9)+")": "Add Item",#AlootSet3ID10 != 0? "Item ID "+#AlootSet3ID10+" - ("+getitemname(#AlootSet3ID10)+")": "Add Item",#AlootSet3ID11 != 0? "Item ID "+#AlootSet3ID11+" - ("+getitemname(#AlootSet3ID11)+")": "Add Item",#AlootSet3ID12 != 0? "Item ID "+#AlootSet3ID12+" - ("+getitemname(#AlootSet3ID12)+")": "Add Item",#AlootSet3ID13 != 0? "Item ID "+#AlootSet3ID13+" - ("+getitemname(#AlootSet3ID13)+")": "Add Item",#AlootSet3ID14 != 0? "Item ID "+#AlootSet3ID14+" - ("+getitemname(#AlootSet3ID14)+")": "Add Item",#AlootSet3ID15 != 0? "Item ID "+#AlootSet3ID15+" - ("+getitemname(#AlootSet3ID15)+")": "Add Item",#AlootSet3ID16 != 0? "Item ID "+#AlootSet3ID16+" - ("+getitemname(#AlootSet3ID16)+")": "Add Item",#AlootSet3ID17 != 0? "Item ID "+#AlootSet3ID17+" - ("+getitemname(#AlootSet3ID17)+")": "Add Item",#AlootSet3ID18 != 0? "Item ID "+#AlootSet3ID18+" - ("+getitemname(#AlootSet3ID18)+")": "Add Item",#AlootSet3ID19 != 0? "Item ID "+#AlootSet3ID19+" - ("+getitemname(#AlootSet3ID19)+")": "Add Item",#AlootSet3ID20 != 0? "Item ID "+#AlootSet3ID20+" - ("+getitemname(#AlootSet3ID20)+")": "Add Item",#AlootSet3ID21 != 0? "Item ID "+#AlootSet3ID21+" - ("+getitemname(#AlootSet3ID21)+")": "Add Item",#AlootSet3ID22 != 0? "Item ID "+#AlootSet3ID22+" - ("+getitemname(#AlootSet3ID22)+")": "Add Item",#AlootSet3ID23 != 0? "Item ID "+#AlootSet3ID23+" - ("+getitemname(#AlootSet3ID23)+")": "Add Item",#AlootSet3ID24 != 0? "Item ID "+#AlootSet3ID24+" - ("+getitemname(#AlootSet3ID24)+")": "Add Item",#AlootSet3ID25 != 0? "Item ID "+#AlootSet3ID25+" - ("+getitemname(#AlootSet3ID25)+")": "Add Item" ))

In Topic: Custom Buffer Request

03 July 2014 - 01:43 AM

 
On line 17 you have an if function and a starting squiggly but it didn't contain an "else" after that squiggly ends.
 
 
Also when looking at it... the switch on line 26 case 1, they have more than 1,500 zeny, and it just deletes the zeny and nothing else... and on line 57.. you have an if function, with nothing there... if allowhealtimer...what?