PDA

View Full Version : Strange Problem...



Wyildarren
08-20-2012, 06:35 PM
[go2: travel time: 0:00:01]
--- Lich: go2 has exited.
[bountygetwl]>ask Rheteger about bounty
Rheteger says, "Hmm, I've got a task here from the town of Wehnimer's Landing. It appears that a local resident urgently needs our help in some matter. Go report to Quin Telaren to find out more. He's the Landing's West Gate guard, though you might want to check Helga's Tavern if he's not at his post. Be sure to ASK about BOUNTIES."

Rheteger adds, "I encourage you to work with other adventurers who are also around your level of experience. If you wish for them to formally aid you in this task, simply bring them before me and ASK me to ADD them to your task."
>
--- SyntaxError: compile error
bountygetwl:11: syntax error, unexpected tIDENTIFIER, expecting $end
wait_while {running?('go2')}
^
[ Next Bounty: +0:15:00, 0:15:00 remaining. ]
bountygetwl:11:in `create_block'
--- Lich: cannot execute bountygetwl, aborting.
--- Lich: bountygetwl has exited.


\/\/\/ Not the full script but I think that's all you need :s


Begin:
start_script "go2", [ "3785" ]
wait_while {running?('go2')}
fput "ask Rheteger about bounty"
match "OnCooldown", "I'm kind of busy right now"
match "Got1", "You have already been assigned a task"
match "Begin", "All done with that assignment"
match "AskGuard", "Reporting back on a successfully completed task"
match "AskGuard", "He's the Landing's West Gate guard"
match "Gems", "The local gem dealer"
match "Forage", "The local healer"
match "Skins", "The local furrier Ghaerdish"
matchwait

Got1:
start_script "go2", [ "228" ]
wait_while {running?('go2')}
echo 'Gotcha!'
exit

OnCooldown:
start_script "go2", [ "228" ]
wait_while {running?('go2')}
echo 'Still on Cooldown.'
exit

AskGuard:
start_script "go2", [ "420" ]
wait_while {running?('go2')}
fput "ask guard about bounty"
match "Hega's Inn", "Who are you trying to ask?"
match "Got1", "Ah, so you're from the Adventurer's Guild?"
match "Begin", "Ah, so you have returned"
matchwait

Hega's Inn:
start_script "go2", [ "3809" ]
wait_while {running?('go2')}
fput "ask guard about bounty"
match "Begin", "Who are you trying to ask?"
match "Got1", "Ah, so you're from the Adventurer's Guild?"
match "Begin", "Ah, so you have returned"
matchwait

Wyildarren
08-22-2012, 03:16 PM
Someone said it might be that I don't have a space between the { and running > {running or between the ) and } in ('go2')} but I've never had that problem before...
Idk what it is but I see NOTHING wrong that would give me this error, anyone got some advice on this?

DaCapn
08-22-2012, 03:56 PM
That sort of error is indicative of dangling loops or if/then statements. Since it's not the full script, we can't know. Comb through it more carefully, looking for proper end statements and closed parenthesis/braces.

You may find `checkbounty` and `Spell[spellnumber].active?`to be helpful (spell number being the number assigned to the bounty timer). Rooms like the adventurer's guild have tags assigned to make them more easily accessible (check built-in targets for go2) so you can just do `;go2 adg` and end up at the adventurer's guild in your area (no need to hard-code any town in). Also, don't use labels. It's a disgusting throw-back.

Restructuring, you can have a much more sane script:


def cooldown
go rest
wait_while { Spell ... }
end

def askguard
go guard
do stuff
end

...

if checkbounty =~ /guard/ then askguard
elsif checkbounty =~ /derpderp/ then hurphurp
else cooldown
end

You may be interested in the script swapbounty.lic as it seems to do whatever you want and more.

subzero
08-23-2012, 11:03 AM
I have noticed a weird problem here, too. It looks a little somethin like this:

http://forum.gsplayers.com/image.php?u=7873&dateline=1342748130