mob/var //just a random guy
DL=3 //the variable we want to boost the other stats with.
Weapon=0 //used later in the equipment segement, to determine if you have a weapon
set category="Techniques" //This is just for my tabs.
if (usr.manacheck(src)) //so they cant initially use it with 0 MP, mana check works fine for single cast, but not concentrated skills.
M.MaxHP+= ((M.MaxHP/100) * DS) //MaxHP/100 finds 1% of their max HP. It is then
//multiplied by DS, to find a %, in this case, 3%. Then it adds 3% of their Max HP to their Max HP while it's active.
//At least, that's how I want it to work.)
M.MaxMP+= ((M.MaxMP/100) * DS)
HP+=min(M.MaxHP, M.HP+((M.MaxHP/100) *DS)) //M.HP is increased by a number found from a % of max HP.
//just going to have these ones since the rest would just be repeats.
//The skill does NOt boost DL.
//I don't know how to make it revert by time, drain mana or revert when you have no mana.
usr<<"You have a weapon equipped!" //Weapon=1 is the variable I'm using when a weapon is equipped in that spot.
return //If something's there, don't equip it!
else //If Weapon is equal to 0, since getting it to 2 should be impossible.)
set src in usr
usr.Str+5 //raise the user's strength.)
usr<<"You equipped the Wooden Sword!"
usr.Weapon+1 //So they cant equip the same weapon multiple times/another one.
new/verb/Unequip() //gives you the ability to unequip it.
set src in usr
usr.Str-5 //takes away the boost
usr<<"You unequipped the Wooden Sword!"
usr.Weapon-1 //no weapon in hand
del/verb/Unequip() //so you can't accidentally deduce your stats by unequipping 90 times.
I just dunno what to do, spent like 7 hours rebuilding and rebuilding and I'm at an impass with my current knowledge. Halp!
Jun 19, 2:28 am
(See the best response by Kozuma3.)
Hey, thanks for reading and checking my problem out. I'm trying to do two things currently and I'm fairly new to using Byond to program anything besides on other's datums, where it was easier to replicate what was done before. (Not ripping, but assisting.) This is what I want the first skill to do: -Boost the User's Stats by a % (relative to the DL var) -Last for, let's say, 60 seconds. -Drain MP over time. -Revert if, MP runs out, they use the 'Revert' skill. -Can't be stacked. Super Bonus Points if you show me: -How it can grant skills that are taken away when not in the form. -How it can increase/decrease movement speed. -How it can deduct damage by a %, rather than a fixed number. But those seem a lot more complicated, I dunno. Here's what I think I've got a grasp on. Code:
Login to reply.