obj
dragonball1
icon = 'dbs.dmi'
icon_state = "e1"
obj
dragonball2
icon = 'dbs.dmi'
icon_state = "e2"
obj
dragonball3
icon = 'dbs.dmi'
icon_state = "e3"
obj
dragonball4
icon = 'dbs.dmi'
icon_state = "e4"
obj
dragonball5
icon = 'dbs.dmi'
icon_state = "e5"
obj
dragonball6
icon = 'dbs.dmi'
icon_state = "e6"
obj
dragonball7
icon = 'dbs.dmi'
icon_state = "e7"
obj
verb
Summondragon()
set category = "Dragon Balls"
set name = "Summon Shenlong"
if(usr.dragonball1 == 1 && usr.dragonball2 == 1 && usr.dragonball3 == 1 && usr.dragonball4 == 1 && usr.dragonball5 == 1 && usr.dragonball6 == 1 && usr.dragonball7 == 1)
usr << "Who has awaken my slumber..."
switch(input("What is your wish", "Customization", text) in list ("Power","Money"))
if("Power")
usr.maxpowerlevel = usr.maxpowerlevel * 2
if("Money")
usr.zenni = usr.zenni + 50000
else
usr << "You don't have all of the dragonballs!"
It tells me that the dragonballs are undefined, can anyone tell me why that is happening?
ID:174735
Jul 23 2003, 7:41 am
|
|
They are. That's not checking if you have them, it's checking if you have a variable called "dragonball1" and if it's equal to 1. You could do something like:
mob/var/dragonball1 obj dragonball1/verb/ PickUpDB() set src in view (1) usr.contents += /obj/dragonball1 usr.dragonball1 = 1 |
You gotta define the variables...But I think it would be easier to just see if they are in the players inventory instead of making a variable for each dragonball
|
In response to Koolguy900095
|
|
or:
mob/var/DragonBalls obj DBall1 name = "Dragon Ball" //blah blah verb Get() usr.DragonBalls += 1 mob/verb/summon_dragon() if(usr.DragonBalls == 7) //BLEH |
In response to Airjoe
|
|
Okay, now I have gotten the summoning working and here is the revised code:
mob/var/dragonball1 obj dragonball1 icon = 'dbs.dmi' icon_state = "e1" verb Get() set category = "Get" set src in oview(1) Move(usr) usr.dragonball1 += 1 Dragonball1() set category = "Dragonballs" mob/var/dragonball2 obj dragonball2 icon = 'dbs.dmi' icon_state = "e2" verb Get() set category = "Get" set src in oview(1) Move(usr) usr.dragonball2 += 1 Dragonball2() set category = "Dragonballs" mob/var/dragonball3 obj dragonball3 icon = 'dbs.dmi' icon_state = "e3" verb Get() set category = "Get" set src in oview(1) Move(usr) usr.dragonball3 += 1 Dragonball3() set category = "Dragonballs" mob/var/dragonball4 obj dragonball4 icon = 'dbs.dmi' icon_state = "e4" verb Get() set category = "Get" set src in oview(1) Move(usr) usr.dragonball4 += 1 Dragonball4() set category = "Dragonballs" mob/var/dragonball5 obj dragonball5 icon = 'dbs.dmi' icon_state = "e5" verb Get() set category = "Get" set src in oview(1) Move(usr) usr.dragonball5 += 1 Dragonball5() set category = "Dragonballs" mob/var/dragonball6 obj dragonball6 icon = 'dbs.dmi' icon_state = "e6" verb Get() set category = "Get" set src in oview(1) Move(usr) usr.dragonball6 += 1 Dragonball6() set category = "Dragonballs" mob/var/dragonball7 obj dragonball7 icon = 'dbs.dmi' icon_state = "e7" verb Get() set category = "Get" set src in oview(1) Move(usr) usr.dragonball7 += 1 Dragonball7() set category = "Dragonballs" obj verb Summondragon() set category = "Dragonballs" set name = "Summon Shenlong" if(usr.dragonball1 == 1 && usr.dragonball2 == 1 && usr.dragonball3 == 1 && usr.dragonball4 == 1 && usr.dragonball5 == 1 && usr.dragonball6 == 1 && usr.dragonball7 == 1) usr << "Who has awaken my slumber..." switch(input("What is your wish", "Summondragon", text) in list ("Power","Money")) if("Power") usr.maxpowerlevel = usr.maxpowerlevel * 2 if("Money") usr.zenni = usr.zenni + 50000 else usr << "You don't have all of the dragonballs!" Does anyone have any idea now how to randomly scatter throughout a single map and then add the command to the gm commands? I have thought about adding a code similar to: location(x,y,1) to the various dragonballs when writing the command, but I can't seem to figure out how to get it to work right. |
In response to SS4Nate
|
|
mob/GM/verb etc. |
In response to Airjoe
|
|
(I know this is a day late) What if the person waits for the dragonballs to respawn and get 7 one dragonballs?
|
dragonball1
dragonball2
etc