Jump to content

RiverStyx

Members
  • Content Count

    9
  • Joined

  • Last visited

Everything posted by RiverStyx

  1. Now, I'm not sure if this is perfectly easy without being very specific in the script, but does anyone know if there's a way to check if a player has in their inventory/cart a large range of items? Basically looking to exclude customs from being on a map, without having a very long and detailed script excluding everything between item ID X and Y. I want to exclude the following item IDs and range of IDs 4480 - 4544 12211 12909 13602 13603 13634 - 13645 14144 - 14212 20000 - 30995 Edit: Nevermind, I can just add a getmapxy (.@map$,.@x,.@y,0); if(.@map$ == "mapname") { end; } to those items. <3
  2. 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. 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])) {
  3. You're a beautiful person, sir. I appreciate your insight.
  4. 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)
  5. So, essentially I want to check some things out, can I use the same label for 2 callsubs with a different number of getargs? case 1: callsub Create2,7136,7129,713,929,7137;case 2: callsub Create2,7139,7137,713,950,970,1044; ..... later on..... ...... if ((countitem(getarg(1)) >= @input) && (countitem(getarg(2)) >= @input) && (countitem(getarg(3)) >= @input) && (countitem(getarg(4)) >= @input) && (countitem(getarg(5)) >= @input) && (countitem(getarg(6)) >= @input) && (countitem(getarg(7)) < @input)) { So if only 5 getargs are set with a variable, is there a way to use the if function to check? or is it just going to be a bunch of } else { within an if function?(not sure if it's even doable.. lol) thanks in advance!
  6. 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" ))
  7. 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?
  8. I currently have it set up like this, if (#AlootSet1ID1 != 0) { set @menu$[1], "Add Item"; } else { set @menu$[1], "Item ID "+#AlootSet1ID1+" - ("+getitemname(#AlootSet1ID1)"+)"; } if (#AlootSet1ID2 != 0) { set @menu$[2], "Add Item"; } else { set @menu$[2], "Item ID "+#AlootSet1ID2+" - ("+getitemname(#AlootSet1ID2)"+)"; } if (#AlootSet1ID3 != 0) { set @menu$[3], "Add Item"; } else { set @menu$[3], "Item ID "+#AlootSet1ID3+" - ("+getitemname(#AlootSet1ID3)"+)"; } if (#AlootSet1ID4 != 0) { set @menu$[4], "Add Item"; } else { set @menu$[4], "Item ID "+#AlootSet1ID4+" - ("+getitemname(#AlootSet1ID4)"+)"; } if (#AlootSet1ID5 != 0) { set @menu$[5], "Add Item"; } else { set @menu$[5], "Item ID "+#AlootSet1ID5+" - ("+getitemname(#AlootSet1ID5)"+)"; } if (#AlootSet1ID6 != 0) { set @menu$[6], "Add Item"; } else { set @menu$[6], "Item ID "+#AlootSet1ID6+" - ("+getitemname(#AlootSet1ID6)"+)"; } if (#AlootSet1ID7 != 0) { set @menu$[7], "Add Item"; } else { set @menu$[7], "Item ID "+#AlootSet1ID7+" - ("+getitemname(#AlootSet1ID7)"+)"; } if (#AlootSet1ID8 != 0) { set @menu$[8], "Add Item"; } else { set @menu$[8], "Item ID "+#AlootSet1ID8+" - ("+getitemname(#AlootSet1ID8)"+)"; } if (#AlootSet1ID9 != 0) { set @menu$[9], "Add Item"; } else { set @menu$[9], "Item ID "+#AlootSet1ID9+" - ("+getitemname(#AlootSet1ID9)"+)"; } if (#AlootSet1ID10 != 0) { set @menu$[10], "Add Item"; } else { set @menu$[10], "Item ID "+#AlootSet1ID10+" - ("+getitemname(#AlootSet1ID10)"+)"; } if (#AlootSet1ID11 != 0) { set @menu$[11], "Add Item"; } else { set @menu$[11], "Item ID "+#AlootSet1ID11+" - ("+getitemname(#AlootSet1ID11)"+)"; } if (#AlootSet1ID12 != 0) { set @menu$[12], "Add Item"; } else { set @menu$[12], "Item ID "+#AlootSet1ID12+" - ("+getitemname(#AlootSet1ID12)"+)"; } if (#AlootSet1ID13 != 0) { set @menu$[13], "Add Item"; } else { set @menu$[13], "Item ID "+#AlootSet1ID13+" - ("+getitemname(#AlootSet1ID13)"+)"; } if (#AlootSet1ID14 != 0) { set @menu$[14], "Add Item"; } else { set @menu$[14], "Item ID "+#AlootSet1ID14+" - ("+getitemname(#AlootSet1ID14)"+)"; } if (#AlootSet1ID15 != 0) { set @menu$[15], "Add Item"; } else { set @menu$[15], "Item ID "+#AlootSet1ID15+" - ("+getitemname(#AlootSet1ID15)"+)"; } if (#AlootSet1ID16 != 0) { set @menu$[16], "Add Item"; } else { set @menu$[16], "Item ID "+#AlootSet1ID16+" - ("+getitemname(#AlootSet1ID16)"+)"; } if (#AlootSet1ID17 != 0) { set @menu$[17], "Add Item"; } else { set @menu$[17], "Item ID "+#AlootSet1ID17+" - ("+getitemname(#AlootSet1ID17)"+)"; } if (#AlootSet1ID18 != 0) { set @menu$[18], "Add Item"; } else { set @menu$[18], "Item ID "+#AlootSet1ID18+" - ("+getitemname(#AlootSet1ID18)"+)"; } if (#AlootSet1ID19 != 0) { set @menu$[19], "Add Item"; } else { set @menu$[19], "Item ID "+#AlootSet1ID19+" - ("+getitemname(#AlootSet1ID19)"+)"; } if (#AlootSet1ID20 != 0) { set @menu$[20], "Add Item"; } else { set @menu$[20], "Item ID "+#AlootSet1ID20+" - ("+getitemname(#AlootSet1ID20)"+)"; } if (#AlootSet1ID21 != 0) { set @menu$[21], "Add Item"; } else { set @menu$[21], "Item ID "+#AlootSet1ID21+" - ("+getitemname(#AlootSet1ID21)"+)"; } if (#AlootSet1ID22 != 0) { set @menu$[22], "Add Item"; } else { set @menu$[22], "Item ID "+#AlootSet1ID22+" - ("+getitemname(#AlootSet1ID22)"+)"; } if (#AlootSet1ID23 != 0) { set @menu$[23], "Add Item"; } else { set @menu$[23], "Item ID "+#AlootSet1ID23+" - ("+getitemname(#AlootSet1ID23)"+)"; } if (#AlootSet1ID24 != 0) { set @menu$[24], "Add Item"; } else { set @menu$[24], "Item ID "+#AlootSet1ID24+" - ("+getitemname(#AlootSet1ID24)"+)"; } if (#AlootSet1ID25 != 0) { set @menu$[25], "Add Item"; } else { set @menu$[25], "Item ID "+#AlootSet1ID25+" - ("+getitemname(#AlootSet1ID25)"+)"; } next; switch(select(@menu$[1],@menu$[2],@menu$[3],@menu$[4],@menu$[5],@menu$[6],@menu$[7],@menu$[8],@menu$[9],@menu$[10],@menu$[11],@menu$[12],@menu$[13],@menu$[14],@menu$[15],@menu$[16],@menu$[17],@menu$[18],@menu$[19],@menu$[20],@menu$[21],@menu$[22],@menu$[23],@menu$[24],@menu$[25])) So I don't want one menu selection to be what it lists, I want multiple menu sections to be a result of the if command, later on the script I have 25 different cases that'll do 25different variable changes. Edit: http://upaste.me/845613346362febb2 If anyone wants to give it a full shot.
  9. Not going to bother posting the entire script since it's over 4,000 lines and such, but essentially I want to make sure that a menu option will display correctly. Variables #AlootSet1ID1 and so on has been set with an item ID already in the script, so, when creating an if command prior to making a switch select.. will this work? if (#AlootSet1ID1 != 0) { set @menu$[1], "Add Item"; } else { set @menu$[1], "Item ID "+#AlootSet1ID1+" - ("+getitemname(#AlootSet1ID1)"+)"; I want it to essentially say as a MENU option Item ID 969 - Gold will it work?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.