ID:163492
 
K lets say i have 1 npc that askes u if u wana be a "Monster" and if you say yes i want the players icon to change in to that monster how do i do that do i add an overlays or will that diapear ones the user logs out?
mob
proc
MonsterType()
var/type=input{src,"yourtext")in list("Yes","No")
switch(type)
if("Yes")
usr.icon = "YourIcon.dmi"
if("No")

mob/npc
NPC
icon = 'YourIcon.dmi'
verb
MonsterPick()
set category ="Commands"
set name = "Pick"
set src in oview(3)
usr.MonsterType()




In response to LifeSavers
hey i was wondering can you do the code like ....


--first example--


---um.. your icon is dragon then you talk to that npc to make you a DragonKnight but the other icons (human,goblin,animal) cant be a DragonKnight



--Second Example--

---when your icon is human,goblin,animal and talked to that npc that makes you dragon knight the npc says ((you have to be a Dragon to be a dragonKnight))


In response to XskyflakezX
Look up 'if()' and 'else'. If you want someone to program for you, try asking in the classified ads.

By the way, "The Code" does not exist! (...or does it?)
In response to GhostAnime
i know "the code" doesn't exist...about 100 people told me that -.-

and i wasn't asking him if he can program me im asking him If he can tell me a code...that im saying
In response to XskyflakezX
mob/npc/classchange
verb/Talk()
if(src.race=="dragon")
src.race = "dragonknight"
src << "you're now a dragonknight"
if(src.race=="human" || src.race=="goblin")
src << "you're not a dragon, you cannot become a dragonknight"


Don't copy & paste it into your game. Learn from it, even though it's crappy.
In response to LucifersHellion
There's a better way:
if(class=="dragon")
world<<"OMG, Dragon!"
else // If the class variable is anything EXCEPT "dragon"
world<<"False alarm, not a Dragon!"
In response to LifeSavers
Usr abuse
In response to LucifersHellion
thx
In response to XskyflakezX
XskyflakezX GET THE OF MY TOPIC PLS AND TY!!!!!!!!!!!!
talk about disrespect