How would I put usr.bldexp +=5 into this code
if(choice == "Brick Wall Lv3")
if(usr.bldlevel >=3) { new /turf/BrickWall(usr.loc) }
else
usr << "You need to be level 3"
ID:177644
Aug 15 2002, 5:22 pm
|
|
Aug 15 2002, 7:55 pm
|
|
Anyone???
|
if(choice == "Brick Wall Lv3")
if(usr.bidlvl >= 3) usr.bidexp += 5 sleep(1) new/turf/BrickWall(usr.loc) else return |
In response to Siientx
|
|
thanx.
|
In response to Siientx
|
|
Siientx wrote:
if(choice == "Brick Wall Lv3") What the heck is the sleep() for? Lummox JR |
Codesterz wrote:
How would I put usr.bldexp +=5 into this code It's just as simple as adding the line, as ShadowSiientx pointed out. However, I'm a bit worried at the setup for this--it looks like you're using a gigantic bunch of if() statements when a list--or multiple lists--would serve you better. For example, suppose you had a couple of lists like this: var/list/buildtypes=list("Brick Wall"=/turf/Brickwall, I bet you could cut out a lot of redundant code that way. There are even better ways to do this; a custom datum, for example, might be the ticket: buildinfo Basically then you create a global list of these datums, and you'd build your choice list like this: var/list/L=list() Lummox JR |
In response to Lummox JR
|
|
I have no idea. =P
Siient |