ID:144474
 
Code:
Well, the Leap_To is messed up. It works, but down on problem I tell you more.
obj
Staff
icon = 'objects.dmi'
icon_state = "Staff"
verb
Send(mob/O in world)
set category = "Sending"
set src in oview(1)
src.Move(O)
verb
Equip()
if(usr.wequipped==0)
usr.Strength+=25
usr.magicstrength+=10
usr.wequipped = 1
else
usr << "You already have a weapon equipped!"
verb
Take()
set src in oview(1)
view()<<"[usr] takes the [src]"
Move(usr)
verb
Drop()
if(usr.wequipped==1)
usr << "You have that equipped!"
world << "[usr] tried to bug abuse by dropping there weapon while it was equipped!"
else
Move(usr.loc)
view()<<"[usr] drops their [src]"
verb
Unequip()
if(usr.wequipped==0)
usr << "You don't have that equipped!"
else
usr.wequipped = 0
usr.Strength-=25
usr.magicstrength-=10
usr << "You unequipped your staff!"


Problem description:
Well you see, the Leap_To is suppose to put it in front of a person, but it puts it inside the users inventory. Now I talked to a couple of people but they didn't know how they could fix it. Now, can someone please help me?
Please, use [src.name] or [usr.name] instead of [src] or [usr] to avoid the dreaded 'the' (I think thats why, besides being a good programmer and stating what value you want :))

For the ==1/==0 part, Learn about boolean and make your life easier.

And for the last point.. I can't seem to find Leap_To, did you posted the correct snippet? Chances are you might've done something similar as to:
mob.Move(mob1)
This will move mob to mob1's inventory. To move to mob1's location, make sure you specify mob1.loc (assuming that the mobs will remain in the turf and not in another container ;) )

- GhostAnime
In response to GhostAnime
Lol sorry I used Leap_To as a sort of Nickname I was thinking of for Send. But it's suppose to move an object to a person, so like it doesn't have top be an NPC but it could be a player as well.
In response to Renparo
Ah, I see. As you can see from my previous example, you are sending it to M's content. To move it in front of M, look up get_step(), using M as the reference/source and using M.dir as the place to place it >_>

- GhostAnime
In response to GhostAnime
Ah, thanks ^_^
The mob.wequipped var should be pointing to the actual weapon equipped, or null if none is in use. It should not be just 1 or 0, because that doesn't tell you anything about which weapon is in use.

Lummox JR