Here is the code for an sword.
obj
weapon
icon = 'Weapons.dmi'
icon_state = "Fireblade"
density = 0
Click()
switch(alert("What do you want to do with [itemname]",,"Examine","Pick it up","Nothing"))
if("Examine")
usr<<browse(info, "window=info,size=650x350,border=5")
if("Pick it up")
usr.Space_check()
if(usr.space_to_use == 0)
usr << "You have no room to hold anything else."
else
usr.itemf_info = {"<center>The Legendary Sword of Death. It is claimed that some guy did something with it at one time.
<br><center>Aim level 100
<br><center>Attack level 100
"}
usr.itemf_pic = "http://www.geocities.com/tk_92064/fsword.gif"
usr.itemf_name = "The Legendary Sword of Death"
usr.itemf_type = "Weapon"
usr.itemf_icon = 'eweapon.dmi'
usr.itemf_icon_sate = "Fireblade"
usr.itemf_stat1 = 100
usr.itemf_stat2 = 100
usr.itemf_stat3 = "un-euiped"
usr.itemf_object = new /obj/weapons/fblade()
usr.Place_item()
sleep(2)
del(src)
if("Nothing")
usr << "Alright"
When you click the sword it starts the switch. How can I get this to only work if you are next to it, and if you are no to say something like "you are to far away."?
Thanks,
~~TK6000~~
ID:173873
![]() Nov 5 2003, 2:33 pm
|
|
if(!usr in view(1))
usr << "NO PIE 4 U!"
B:
if(get_dist(src,usr)>1)
usr << "STILL NO PIE 4 U!!"