Kealiock Family Friend
Joined: 11.09.2005 Posts: 210 | Posted: 30 Jul 2006 03:16 Subject: 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...
|
Up | View profile :: Send message |
|
Kealiock Family Friend
Joined: 11.09.2005 Posts: 210 | Posted: 30 Jul 2006 07:57 Subject: 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? |
Up | View profile :: Send message |
|
Avian Council Member
Joined: 12.12.2004 Posts: 1124 | Posted: 30 Jul 2006 08:02 Subject: It's freaking ratting, stop making it so damn complicated! |
Up | View profile :: Send message |
|
Kealiock Family Friend
Joined: 11.09.2005 Posts: 210 | Posted: 30 Jul 2006 08:04 Subject: 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 |
Up | View profile :: Send message |
|
Arota Council Member
Joined: 11.05.2005 Posts: 1667 | Posted: 30 Jul 2006 08:10 Subject: 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. |
Up | View profile :: Send message |
|
Kealiock Family Friend
Joined: 11.09.2005 Posts: 210 | Posted: 30 Jul 2006 08:13 Subject: see avian... someone who likes my anal scripts... now for it to flipping work right... like it does on my main client... |
Up | View profile :: Send message |
|
Arota Council Member
Joined: 11.05.2005 Posts: 1667 | Posted: 30 Jul 2006 08:40 Subject: 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. |
Up | View profile :: Send message |
|
Kealiock Family Friend
Joined: 11.09.2005 Posts: 210 | Posted: 03 Aug 2006 09:53 Subject: i have prices built into my concoctions script... |
Up | View profile :: Send message |
|
|