http://img514.imageshack.us/img514/7971/sadi.jpg
that allows users to choose options and have actions done based on their choice. Which transitions into my next question: I want to have players be able to choose their powers when they join the world, and their choice of power decides what verbs they receive. Right now when you log onto the world you just get all verbs that have been created. How do I fix this problem?
mob
icon = 'male.dmi' //make it so all mobs will be created with the person icon
var
water = 0
fire = 0
electricity = 0
attack = 1
eattack = 0
defense = 1
exp = 0
max_exp = 100
HP = 30 //declares a new variable called HP with a value of 30
Wealth = 0
maxhp = 100
spark = 0
flame = 0
mugger
HP = 20
defense = 1
exp = 40
icon = 'mugger.dmi'
bug //new prototype
HP = 5
defense = 0
exp = 20
icon = 'bug.dmi' //overrides the parent's icon, the parent icon is person.dmi
Click()
usr<< "please dont kill me!"
Del()
var/obj/gold/G = new(loc) //create a new obj from the gold blueprint
G.amount = rand (1,100) //sets its amount varibale randomly
..() //call the parent
Login()
icon_state = gender //when a player logs in, make their icon's state
world<< "[src] has logged in!" //announces player entry
..() //the gender of their key. Then call the parent!
Stat()
stat("Wealth",Wealth)
stat("HP","[HP]/[maxhp]")
stat("attack",attack + eattack)
stat("defense",defense)
stat("exp","[exp]/[max_exp]")
proc
DeathCheck() //check to see if attack is deadly
if(src.HP <=0) //if the defender's HP is low enough and is not a player
usr.exp += src.exp // gives the exp of defeated mob to attacker
if(src.client) // if the dead person is a player
src.HP = src.maxhp
src.Move(locate(1,20,1))
world<< "[src] was killed by [usr]!" //give the death messaging
else
del (src) //delete whatever just died
LevelUp()
if(exp >= max_exp) //if the exp is greater than or equal to max exp
attack++ //add 1 to the attack
defense++ //add 1 to the defense
exp -= max_exp //make sure they dont lose exp
max_exp *=2 //multiply the max_exp by 2
HP *=1.5 //multiply the HP by 1.5
src << "You leveled up!" //tell the src they leveled up.
//dont use usr in proc
verb
attack(mob/M as mob in oview(1)) //attack a mob within 1 tile of you
var/damage = src.attack + src.eattack -M.defense //attack - enemy defense
usr<< "You attack [M] for [damage] damage!" //send this message to the user
M.HP -= damage //take away damage from M
M.DeathCheck() //check for death with a proc
src.LevelUp()
phase()
density = !density
if(density)
usr<< "your atom density normalizes."
else
usr<< "you focus on the ethereal plane."
set_name(N as text)
set desc = "(\"new name\") Change your name."
name = N
world_say(msg as text) //what the usr says is passed into "msg" as text world<< "[usr]: [msg]" //the world sees chatroom-like output
say(msg as text)
view() << "[usr] says: [msg]"
whisper(M as mob in world,txt as text)
usr<< "you tell [M]: [txt]"
M<< "[usr] tells you: [txt]"
vanish()
if(invisibility <= 0)
invisibility = 1
usr<< "You bend the light to conceal your location."
else
invisibility = 0
usr<< "You correct the light around you."
rest()
usr<< "you begin to rest"
while(usr.HP < usr.maxhp)
usr.HP += 10
sleep(20)
if(usr.HP == usr.maxhp)
usr<< "you finish resting!"
Spark()
if(spark <=0)
usr.eattack = usr.attack
spark = 1
overlays += 'spark.dmi'
usr<< "a surge of energy flows through your body"
else
spark = 0
usr.eattack = 0
usr<< "the power subsides"
as you can see I added the vars fire, water, and electricity. I'm assuming I have to do something like if fire = 1 then you get such and such fire verbs, etc.