Jump to content

  •  

RiverStyx

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

Topics I've Started

Exclude range of specific items from a map

15 December 2014 - 08:54 PM

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
 

Little help with an if function.

08 July 2014 - 10:01 PM

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!


Specific options within a menu!

02 July 2014 - 12:01 PM

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? :D