Bloodrose Family Forums Archive


Public Board

-

Scripts

-

HALP!!

Poted by Kealiock on 30 Jul 2006 03:16 - HALP!!
sub OnRatter(a)
dim rat1, rat2, bal, lbrat, dbrat, lyrat, dyrat, lnrat, dnrat, lorat, dorat, lblrat, dblrat

bal = world.getvariable ("balance")
lbrat = world.getvariable ("live_brat")
lyrat = world.getvariable ("live_yrat")
lnrat = world.getvariable ("live_nrat")
lorat = world.getvariable ("live_orat")
lblrat = world.getvariable ("live_blrat")
dbrat = world.getvariable ("dead_brat")
dyrat = world.getvariable ("dead_yrat")
dnrat = world.getvariable ("dead_nrat")
dorat = world.getvariable ("dead_orat")
dblrat = world.getvariable ("dead_blrat")
rat1 = cLng(lbrat) + cLng(lyrat) + cLng(lnrat) + cLng(lorat) + cLng(lblrat)
rat2 = cLng(dbrat) + cLng(dyrat) + cLng(dnrat) + cLng(dorat) + cLng(dblrat)

if bal = "on" then
if rat1 > 0 then
     world.send "smite rat"
   elseif rat2 = 5 then
     world.send "get rat"
     world.send "get rat"
     world.send "get rat"
     world.send "get rat"
     world.send "get rat"
   elseif rat2 = 3 then
     world.send "get rat"
     world.send "get rat"
     world.send "get rat"
end if
end if

end sub


keeps giving me an error with the cLng "mistype: cLng"

HALP!!

EDIT:
just ignore me... i was being Anal and changed it alot...
Poted by Kealiock on 30 Jul 2006 07:57 -
Unterminated string constant
Line in error:
world.Info " Total Rats: " & total & " | Total Gold: " & gold & " | Black: " & black & " | Old: " & old & " | Rat: " & adult & " | Young: " & young & " | Baby: " & baby "


indi?
Poted by Avian on 30 Jul 2006 08:02 -
It's freaking ratting, stop making it so damn complicated!
Poted by Kealiock on 30 Jul 2006 08:04 -
you want complicated... this is the rest of that script...
dim rat, PackGold, total, gold, black, old, adult, young, baby

rat = world.getvariable ("dead_rat")
rat = cLng(rat) - cLng (1)
world.setvariable "dead_rat", rat

PackGold = world.GetVariable ("PackGold")
total = world.GetVariable ("TotalRat")
gold = world.GetVariable ("TotalRatGold")

if "%2" = "a baby rat" then
rat = world.GetVariable ("BabyRat")
rat = cint (rat) + 1
total = cint (total) + 1
gold = cint (gold) + 10
world.SetVariable "BabyRat", rat
end if

if "%2" = "a young rat" then
rat = world.GetVariable ("YoungRat")
rat = cint (rat) + 1
total = cint (total) + 1
gold = cint (gold) + 20
world.SetVariable "YoungRat", rat
end if

if "%2" = "a rat" then
rat = world.GetVariable ("AdultRat")
rat = cint (rat) + 1
total = cint (total) + 1
gold = cint (gold) + 30
world.SetVariable "AdultRat", rat
end if

if "%2" = "an old rat" then
rat = world.GetVariable ("OldRat")
rat = cint (rat) + 1
total = cint (total) + 1
gold = cint (gold) + 40
world.SetVariable "OldRat", rat
end if

if "%2" = "a black rat" then
rat = world.GetVariable ("BlackRat")
rat = cint (rat) + 1
total = cint (total) + 1
gold = cint (gold) + 50
world.SetVariable "BlackRat", rat
end if

world.SetVariable "TotalRat", total
world.SetVariable "TotalRatGold", gold
black = world.GetVariable ("BlackRat")
old = world.GetVariable ("OldRat")
adult = world.GetVariable ("AdultRat")
young = world.GetVariable ("YoungRat")
baby = world.GetVariable ("BabyRat")
world.InfoClear
world.Info " Total Rats: " & total & " | Total Gold: " & gold & " | Black: " & black & " | Old: " & old & " | Rat: " & adult & " | Young: " & young & " | Baby: " & baby
Poted by Arota on 30 Jul 2006 08:10 -
Oooh, you count how much gold from each rat.

Bleh.  I contemplated that, but with balances and forging, my status bar is already too crowded.
Poted by Kealiock on 30 Jul 2006 08:13 -
see avian... someone who likes my anal scripts... now for it to flipping work right... like it does on my main client...
Poted by Arota on 30 Jul 2006 08:40 -
Heehee.  You're talking to someone who makes random scripts for EVERYTHING.  I have my forging price system coded in, along with tattoos and woodcrafting.  And we won't even MENTION what my other characters have...

Or my kill tracker.
Poted by Kealiock on 03 Aug 2006 09:53 -
i have prices built into my concoctions script...

Back to main forum archive

View normal forum version