ID:271577
 
ok i know this is simple but to make my NPCS talk can some1 tell me wat to look up in the reference or guide
Dimone Jr wrote:
ok i know this is simple but to make my NPCS talk can some1 tell me wat to look up in the reference or guide

depends on if the npc is an obj or a mob but for now we will call it an obj
// < is a note meaning any line with // anything after the // until a new line is a note
obj
verb
Talk()
// set src in range(2)
// usr<<"NPC: msg"
// This one above this msg is rather simple this is just when someone uses the talk verb when the npc
//is on the screen it sends them the single msg below is a little more complex an allows the user to
//select what they want to talk to the npc about. Also you might want to use a set src in range(2)
//or something so they need to be rather close to the npc before they get the verb. I will place
//an example of set src in range(2) being
//used in both the above an below options.

// set src in range(2)
// ab
// switch(input("What do you need?","Info")in list("Tell me something","Tell me something else","Bye"))
// if("Tell me something")
// usr<<"NPC: Option 1 reply."
// goto ab
// if("Tell me something else")
// usr<<"NPC: another reply"
// goto ab
// if("Bye")
// return

lots of ways to do it.

In response to Ac19189
k thnx but its a mob
In response to Dimone Jr
Dimone Jr wrote:
k thnx but its a mob

NPCs do not need to be mobs, because mobs are per definition containers for players.

-- Data
In response to Android Data
ok then can u tell me wat things shuld be mobs and wat shuld be objs plz
In response to Dimone Jr
It's perfectly logical to make NPCs mobs if you ask me. As, by definition, mobs are mobile objects. I would just do it intuitively. Like make swords objs, people mobs, dogs mobs, pens objs, mountains turfs and so on.
In response to Abhishake
ty thnx but wat do u think buildings shuld be
In response to Abhishake
Abhishake wrote:
It's perfectly logical to make NPCs mobs if you ask me. As, by definition, mobs are mobile objects. I would just do it intuitively. Like make swords objs, people mobs, dogs mobs, pens objs, mountains turfs and so on.

Mobs are containers for clients, nothing more and nothing less. It makes more sense to make NPCs objs, since they're not controlled by the player.

If I were to implement NPCs I would just do it like this:
npc/parent_type=/obj


Done.

-- Data
In response to Android Data
I don't see anything in the reference that says mobs are just containers for clients. But really, there's not a whole world of difference between mobs and objs. In theory, you could make your entire game objs (except of course the clients).
In response to Abhishake
ok also im having a problem wit my flick code can u guys help can u guys help wit my code its now workin at all
In response to Dimone Jr
Any mapping such as ground, trees, water all should be turf unless you need something else in some cases obj is used for like example tree's..

However you can make it all w/e you want you can make it turf, obj, mob etc. It is all based on how you want to do it there really isnt a right way though most people do it one way. :P
In response to Ac19189
ok koll also my flick verb isnt wrking xcan 8u help i want it so wen u press atackk ur char atacks i hav both icons already