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

too tired to figure this out

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
The Drizzle
Who is the Drizzle?




Joined: 12 Nov 2003
Posts: 432

PostPosted: Thu Mar 17, 2005 4:45 am    Post subject: too tired to figure this out Reply with quote

As the title shows, I'm pretty tired, too tired to figure this out. Excuse any grammatical errors or sloppy scripting in advance. I really can't focus right now.

What I want this script to do is give a somewhat random amount of money every so often based on the variable "lotto." If the random lotto number is 1, then the hero should get money. It should check the value of lotto every

I also only want this to work if a certain hero is the leader (tag 9) and if the hero is moving. What am I doing wrong? I'm pretty sure there's an easier way to do this then the way i'm doing it, too, but I can't really think of anything right now.

Code:
variable (lotto)
set variable (lotto, random (1,12))
show value (lotto)

if (check tag (9) == true) then (
if (hero is walking (0) == true) then (
wait (15)
if (lotto == 1) then (
get money (random (1,get hero stat (0,stat:HP,current stat)/9))
set variable (lotto, random (1,12))

else (
wait (15)
set variable (lotto, random (1,12))))

_________________
My name is...
The shake-zula, the mic rulah, the old schoola, you wanna trip? I'll bring it to yah...
Back to top
View user's profile Send private message AIM Address
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Thu Mar 17, 2005 8:05 am    Post subject: Reply with quote

I... I'm sorry. You're going to have to fill in some details here.

Checks the script every what? Shouldn't there be a loop in here somewhere?
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
The Drizzle
Who is the Drizzle?




Joined: 12 Nov 2003
Posts: 432

PostPosted: Thu Mar 17, 2005 2:10 pm    Post subject: Reply with quote

It's an each-step script. I got it worked out, I don't know how it got as jumbled as it did. I cut it down to this:

Code:
variable (lotto)
set variable (lotto, random (1,20))
show value (lotto)

if (check tag (9) == true) then (
if (lotto == 7) then (
get money (random (1,get hero stat (0,stat:HP,maximum stat)/9))
))


Works perfect now. Thanks anyway.
_________________
My name is...
The shake-zula, the mic rulah, the old schoola, you wanna trip? I'll bring it to yah...
Back to top
View user's profile Send private message 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