I took a very quick look thru your code, cant test it out here at work, but was just scanning thru to see how it looks. I have a couple of pointers for you, that some others were nice enough to pass along to me in the past. These will cut down dramatically on the number of lines of code you have, as well as the number of sub-routines.
1)
menu get Arachnid ;slayers
if #menures = #true
set %ArachnidSlayer #true
if #menures = #false
set %ArachnidSlayer #false
menu get Demon
if #menures = #true
set %DemonSlayer #true
if #menures = #false
set %DemonSlayer #false
menu get Elemental
if #menures = #true
set %ElementalSlayer #true
if #menures = #false
set %ElementalSlayer #false
menu get Repond
if #menures = #true
set %RepondSlayer #true
if #menures = #false
set %RepondSlayer #false
menu get Reptile
if #menures = #true
set %ReptileSlayer #true
if #menures = #false
set %ReptileSlayer #false
menu get Undead
if #menures = #true
set %UndeadSlayer #true
if #menures = #false
set %UndeadSlayer #false
menu get Fire ;damage types
if #menures = #true
set %FireDmg #true
if #menures = #false
set %FireDmg #false
menu get Cold
if #menures = #true
set %ColdDmg #true
if #menures = #false
set %ColdDmg #false
menu get Poison
if #menures = #true
set %PoisonDmg #true
if #menures = #false
set %PoisonDmg #false
menu get Energy
if #menures = #true
set %EnergyDmg #true
if #menures = #false
set %EnergyDmg #false
menu get Multiple
if #menures = #true
set %Multiple #true
if #menures = #false
set %Multiple #false
menu get SSI25
if #Menures = #true
set %SSI25 #true
if #menures = #false
set %SSI25 #false
menu get SSI30
if #Menures = #true
set %SSI30 #true
if #menures = #false
set %SSI30 #false
Ok, someone can feel free to correct me if I am wrong, but I am pretty sure that you do not need all those if#menures = #false
statements in there. In fact you can shorten up your code a lot but simply writing it like this:
Menu get Arachnid
If #menures
Set Arachnid #true
Menu get blahblah
If #menures
Set blahblah #true
Menu get YouGetThePoint
If #menures
Set YouGetThePoint #true
2)
sub CheckWeapon1
if %ArachnidSlayer = #true
gosub CheckArachnidSlayer
if %ElementalSlayer = #true
gosub CheckElementalSlayer
if %ReptileSlayer = #true
gosub CheckReptileSlayer
if %UndeadSlayer = #true
gosub CheckUndeadSlayer
if %RepondSlayer = #true
gosub CheckRepondSlayer
if %DemonSlayer = #true
gosub CheckDemonSlayer
This could be changed up a little and the resulting subs could also be changed to a single sub:
sub CheckWeapon1
if %ArachnidSlayer = #true
gosub CheckSlayer arachnid
if %ElementalSlayer = #true
gosub CheckSlayer elemental
if %ReptileSlayer = #true
gosub CheckSlayer reptile
if %UndeadSlayer = #true
gosub CheckSlayer undead
if %RepondSlayer = #true
gosub CheckSlayer repond
if %DemonSlayer = #true
gosub CheckSlayer demon
The resulting subs could all be captured in one sub like follows:
Sub CheckSlayer ; %1 property passed from above sub to check for..E.G. arachnid, demon, etc
finditem %MadeWeapon C_ , #backpackid
if #findcnt >= 1
{
event property #findid
if %1 in #property
{
wait 5
Gosub StoreWeapon
Return
}
}
Return
The same can be done for you cold, fire, poison etc damage weapons as well.
This line may give you some unexpected results:
if %elemental in #property && Fire notin #property && Water notin #property && Poison notin #property && Air notin #property && Earth notin #property && Blood notin #property && Snow notin #property && Ice notin #property
The unexpected results will come in when you make an elemental slayer that also has fire or poison damage on the bow. In other words, if you make an Elemental superslayer with 50 phy damage and 25 fire damage and 25 poison damage, this bow will not get stored.
Again, just some real quick looks thru your code and hopefully something helpful. Your doing a great job so far, keep up the good work!
JaF