sub Stash (strTriggerName, trig_line, arrWildCards)
'Stash
' This script is for those persons that keep all their money in a specific container
' A belt pouch or a backpack, by typing the command 'Stash', all their platinum coins
' gold coins and silver coins are stored into the container specified.
' to install place this SUB into your script and type
' /sub "install", "backpack", ""
' where the "backpack" is your choice of container
' credits go to 'Storm Dragon' for making this script
' Do enjoy :)
dim isany
dim plat
dim gold
dim silver
dim finalcommand
select case lcase(strTriggerName)
case "install"
World.addalias "Stash", "stash", "", 8225, "Stash"
world.setvariable "Holding", trig_line
world.note "Stash Subroutine Installed type Stash to put your money into the container"
case "stash"
world.addtrigger "WorthTMP", "You have * platinum, * gold, and * silver.", "", 1, -1, 0, "", "Stash"
world.send "worth"
case "worthtmp"
plat = arrWildCards(1)
gold = arrWildCards(2)
silver = arrWildCards(3)
finalcommand = ""
isany = false
if plat > 0 then
finalcommand = finalcommand & "put " & plat & " plat in " & world.getvariable ("Holding") & ";"
isany = true
end if
if gold > 0 then
finalcommand = finalcommand & "put " & gold & " gold in " & world.getvariable ("Holding") & ";"
isany = true
end if
if silver > 0 then
finalcommand = finalcommand & "put " & silver & " silver in " & world.getvariable ("Holding") & ";"
isany = true
end if
if isany = true then
finalcommand = finalcommand & "close " & world.getvariable ("Holding")
world.send finalcommand
end if
world.deletetrigger "WorthTMP"
case else
world.note "Stash Subroutine is invalid.. Installing!"
call stash ("install", "Backpack", "")
world.note "Please remember to set the Variable: 'Holding' in the variable list - default is 'backpack'"
end select
end subStash Script
Posted by Storm Dragon on Mon 26 Nov 2001 08:36 PM — 1 posts, 10,587 views.