Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

help meh

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Pako the True G
pako




Joined: 26 Mar 2005
Posts: 184
Location: Bleh-ville

PostPosted: Wed Oct 26, 2005 12:55 pm    Post subject: help meh Reply with quote

could someone pleez tell me why dis script wont compile...?

Code:
Define Script (8,Racing,none)
script, Racing, begin
suspend player
variable (starttime)
starttime := system second
while (system second << starttime + 5) do (
clear string (31)
append number (31, starttime + 5 - system second)
center string at (31, 160, 196)
wait )
hide string (31)
resume player
variable (winner)
while (winner == 0) do (
#AI goes here
if (npc is walking (npc) == 0) then (
if ((read pass block(npc x(npc), npc y(npc)), and, 4) or (read pass block(npc x(npc), npc y(npc) + 1), and, 1))
then ( walk npc (npc, random(0,1)*2+1, 1) ) else ( walk npc (npc, down, 1) )
if (at finish line (hero x, hero y)) then (winner := 1)
if (at finish line (npc x(npc), npc y(npc))) then (winner := 2)
wait
if (winner == 1) then ( you won stuff )
if (winner == 2) then ( teleport to map (00,10,18)
end

_________________
Image and video hosting by TinyPic
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Cube
Dimensional Traveller




Joined: 02 Feb 2003
Posts: 294

PostPosted: Wed Oct 26, 2005 1:21 pm    Post subject: Reply with quote

Missing 3 ) thingies at the end. This should compile:

Code:

Define Script (8,Racing,none)

script, Racing, begin
suspend player
variable (starttime)
starttime := system second
while (system second << starttime + 5) do (
   clear string (31)
   append number (31, starttime + 5 - system second)
   center string at (31, 160, 196)
   wait
)
hide string (31)
resume player
variable (winner)
while (winner == 0) do (
   #AI goes here
   if (npc is walking (npc) == 0) then (
      if ((read pass block(npc x(npc), npc y(npc)), and, 4) or (read pass block(npc x(npc), npc y(npc) + 1), and, 1)) then (
         walk npc (npc, random(0,1)*2+1, 1)
      ) else (
         walk npc (npc, down, 1)
      )
      if (at finish line (hero x, hero y)) then (
         winner := 1
      )
      if (at finish line (npc x(npc), npc y(npc))) then (
         winner := 2
      )
      wait
      if (winner == 1) then (
         you won stuff
      )
      if (winner == 2) then (
         teleport to map (00,10,18)
      )
   )
)
end
Back to top
View user's profile Send private message
Pako the True G
pako




Joined: 26 Mar 2005
Posts: 184
Location: Bleh-ville

PostPosted: Wed Oct 26, 2005 2:12 pm    Post subject: Reply with quote

thanks! Big grin
_________________
Image and video hosting by TinyPic
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Battleblaze
Warrior Thread Monk




Joined: 19 Dec 2003
Posts: 782
Location: IndY OHR

PostPosted: Fri Nov 04, 2005 2:53 pm    Post subject: Reply with quote

OHR racing!? Hotdamn that ideas been in ym head forever but I never figured how I would work it. If you need some graphics I'd behappy to make some.
_________________
Indy OHR! and National OHR Month Contest going on now!

"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group