ID:178924
 
Oh my god.. i cant believe i cant get this.
i need a equip / unequip code that does the following.
* When you have 2 weapons in inventory, you can equip one, unequip the other and bug it to get good stats.
* Equip 2 weapons at once *i can do this already*
here is my weapon, code.


obj/weapon/Rapier
icon = 'items.dmi'
icon_state = "Rapier"
name = "Rapier"
Money = 2
power = 2
desc = "Rapier-"
desc1 = "Weapon Power = 2"
desc3 = "Selling Cost = 2"
desc2 = "This weapon is for Fighters Only!"
verb
Equip()
set category = "Commands"
if(usr.wep == src.name)
usr << "Your already have somthing Equiped!"
if(usr.wep == null)
if(usr.char =="Wizard")
alert("your class cant Equip that!")
else
usr.attack+=power
view(6) << "[usr] Equips his Rapier."
usr.wep = src.name
usr.equiped = 1
suffix += "Equiped"
UnEquip()
set category = "Commands"
if(usr.wep == null)
usr << "You have Nothing equiped!"
if(usr.wep == src.name)
usr << "Your have somthing equiped!"
if(usr.wep == src.name)
usr.wep = null
usr.attack-=power
suffix = null
usr.equiped = 0


Hope somone can help, thanks
- RaeKwon

mob
proc
Equip()
set category = "Commands"
if(usr.wep == src.name)
usr << "Your already have somthing Equiped!"
if(usr.wep == null)
if(usr.char =="Wizard")
alert("your class cant Equip that!")
else
usr.attack+=power
view(6) << "[usr] Equips his Rapier."
usr.wep = src.name
usr.equiped = 1
suffix += "Equiped"

and then for the unequip use else

else
set category = "Commands"
if(usr.wep == null)
usr << "You have Nothing equiped!"
if(usr.wep == src.name)
usr << "Your have somthing equiped!"
if(usr.wep == src.name)
usr.wep = null
usr.attack-=power
suffix = null
usr.equiped = 0

and then..


obj/weapon/Rapier
icon = 'items.dmi'
icon_state = "Rapier"
name = "Rapier"
Money = 2
power = 2
desc = "Rapier-"
desc1 = "Weapon Power = 2"
desc3 = "Selling Cost = 2"
desc2 = "This weapon is for Fighters Only!"
Click()
usr.Equip()

That might work, I think thats how you do it, correct me if wrong, but that should make it uncheat-able.

~Kus
In response to Kusanagi
thankyou very very much
- RaeKwon