ID:269416
 
Say i have this mob



mob
Entrance_D00d
icon = 'blank.dmi'
density=1
verb
Speak()
set category = "Main"
set src in oview(1)
switch(input("Do j00 want into the cirucs?",text) in list("Yes","No"))
if("Yes")
switch(input("Are you sure you want entrance?",text) in list("Entrance"))
if("Entrance")
if(usr.cash>=5)
usr.cash = (usr.cash - 5)
usr.loc = locate(10,2,16)
else
alert("Not Enough cash! Get Out!!")
if("no")
alert("K")

arg i forgot how to post code.. oh well..
anyways..


how do i make it so when you right click on entrance d00d that all it says is "speak" and not "boot" and "ban" and all that other jazz?

THANKS ^_^

-Cait

edit: i could do set popup_menu = 0 on every verb i know, but i want JUST that specific mob to have ONLY speak cuz i want the verbs for the people just not the mobs

thanks again ^^
I dont think there is a way to do that..
except for setting all of the other verbs in
set hidden=1

but that hides the verbs, so I dont think thats usefull..

O-matic
In response to O-matic
but like in thie one dragon warrior game

you click the shop dude and it''d have "Buy" and "Sell"

and you click the Inn dude and it'd have "Sleep"

unless they set like

mob2. mob3, i dont even know if thats possible..
In response to Mashed_The_Hamster
mob
mob1
verb
asdf()
if(get_dist(src,usr)>1)return
usr<<"Hello there!"
mob2
verb
asdf2()
if(get_dist(src,usr)>1)return
usr<<"Hello there, again!"


Two mobs, two different verbs.
In response to Ol' Yeller
Ol' Yeller wrote:
> mob
> mob1
> verb
> asdf()
> if(get_dist(src,usr)>1)return
> usr<<"Hello there!"
> mob2
> verb
> asdf2()
> if(get_dist(src,usr)>1)return
> usr<<"Hello there, again!"

Two mobs, two different verbs.

was that what he want????? I'm confused..
I thought he meant that he doesn't want all the other verbs in the right click menu...

oh well...

O-matic
In response to O-matic
What do you mean? It works for me.
In response to Ol' Yeller
Yes but if you right click them they also have

Whisper
Marriage
Add Gm
Boot
Ban

and i dont want those there.
In response to Mashed_The_Hamster
You could make the NPCs objs then, I don't know how your verbs are set up. Or make your verbs for clients and not mobs.
In response to Mashed_The_Hamster
Mashed_The_Hamster wrote:
Yes but if you right click them they also have

Whisper
Marriage
Add Gm
Boot
Ban

and i dont want those there.

you cant remove them from there unless you delete those verbs or like O'| Yeller mentioned make the mobs objs.

O-matic
In response to O-matic
Yeaaah but it still has Delete OBJ and Edit.. on there.. for objects..

but uhm..

i guess if you guys figure out a way to have specific verbs not on speicific mobs (or objs) then gimme a msg =3

thanks for you help ^_^
In response to Mashed_The_Hamster
Use clients instead of mobs if the verbs are only meant for players.
ie:
mob
verb
helloclient(client/c as client in world)//It may be c as client or\
client/c, I can't remember

if(!c)return
c<<"[src]: Hello, [c.mob.name]!"
In response to Ol' Yeller
ok this will probably work but how would i impliment it into my verbs

like whisper for example

mob/verb/
Whisper(M as mob in world,msg as text)
set category = "Chat"
M << "[usr] whispers, '[msg]'"
usr << {"You have whispered To [M] : [msg] "}


would it be like

mob
verb
Whisper(client/c as client in world)//It may be c as client or\
client/c, I can't remember
if(!c)return
M << "[usr] whispers, '[msg]'"
usr << {"You have whispered To [M] : [msg] "}

??
or what?

Simply horrible advice, folks. If you don't know what you're talking about, let someone else who does post. This is supposed to be a place to learn, not confuzzle. :P

So, you defined a bunch of verbs for moderating players at the mob level, and you want to know how to remove them for your NPCs? Why not just define those verbs for player mobs, instead of under mob?

mob
verb
Global()
set src in oview()
src << "This verb is on all mobs."

NPC
verb
Speak()
set src in oview()
src << "This verb is only on NPC mobs."

Player
verb
Kick()
set src in oview()
src << "This verbs is only on player mobs."


See how that works? Only NPCs will have the Speak, only Players will have Kick, and everyone has Global. When you define something at a higher level (in your case, /mob), it is shared by everything defined as a sub-type of that level. By giving /mob the Global verb, every sub-type of /mob, including /mob/NPC and /mob/Player will have it. But, because we defined Speak and Kick at the specific sub-level, only that type and it's sub-types will get it. So, a /mob/NPC/Entrance_D00D will have the Global and Speak verbs, becuase it is a sub-type of both /mob and /mob/NPC, while a /mob/Player/Necromancer will have the Global and Kick verbs.

There is a way to re-define the verbs for sub-types, but the above method is a better design for this situation. Make sense?

~X
In response to Xooxer
Yeah but... some things are global even though it doesnt HAVE the global thingy there..

so..

do YOU know how i'd impliement the client thing into the verb? cuz they arent answering it yet o_O
In response to Mashed_The_Hamster
well that code i tried says

verbs.dm:4:error: Bad input type: client



so .. what would whisper be? XD
In response to Mashed_The_Hamster
Global thingy... what? And, no, I'm not going to show you how to do client verbs, this method works. Client verbs are hacky, I won't show you bad techniques, sorry.

~X
In response to Xooxer
ok ...
see this code...

mob/verb/
Whisper(M as mob in world,msg as text)
set category = "Chat"
M << "[usr] whispers, '[msg]'"
usr << {"You have whispered To [M] : [msg] "}

It doesnt have the Global() in it, yet it is global to ALL mobs and players

is there anyway to set whisper JUST to the players?

=3
In response to Mashed_The_Hamster
There is no Global() thingy that makes verbs global. That was just the name I gave to that particular verb. What makes it global is where it is defined. Your whisper verb is defined right under /mob. See that? Right there, /mob/verb/Whisper(). What you want is to define it only for player mobs: /mob/player/verb/whisper. This assumes you have players running around as sub-types of /mob/player, like /mob/player/Necromancer or /mob/player/Pirate. It's generally bad practice to define things right under mob if they aren't going to be needed by all mobs in the game.

~X
In response to Xooxer
Here, maybe this will help.

world
mob = /mob/Player // We want new clients to be Player mobs



mob // This defines vars, verbs and procs for ALL mobs

var // Tells DM to give every mob these variables
// Every mob below will have these, including
// our players and all the NPCs. This is because
// they are all types of mobs, so they all get
// the verbs and variables defined for mobs

weight // Every mob in the game will have
height // a weight, height and age variable
age // no matter if they are a player or not


verb // You can Look at every mob in the game
Look() // because this verb is defined at the /mob
// level, giving it to all sub-types of /mob
set src in oview()
src << "You don't see anything special."



Player // This is the mob our players will use

var
level // Only players will have these
health // variables, becuase they are only
exp // defined here, under /mob/Player


verb // These verbs will only be on players

Kick() // Now we can only Kick players, not NPCs
set src in oview()
src << "U r ! 1337" // n00b!


Warrior // You probably don't want player all being /mob/Players
// so we'll give some sub-types for them to choose from

level = 1 // since we defined these above, we can just
health = 150 // set their values here, like they were
exp = 0 // already built-in variables, like name or desc


verb // Here, I decided Warriors can do something special
Bash() // So only they have the Bash verb
src << "You killed a bug!"



NPC // This is the mob all non-playable characters will use

var // Only NPCs will have these variables
job
hint
angry


verb // These verbs are only for NPCs

Speak() // Now you can only Speak with NPCs, not players
set src in oview()
src << "[job] [name]: [hint]"

Attack()
set src in oview()
src << "[job] [name]: [angry]"


Guard // We'll have a sub-type of /mob/NPC for Guards
// Then, just set the variables for an NPC. Since
// we already defined these variables at a higher
// level, /mob/NPC, we don't have to put var in front
// of them, we just need to give them values. They were
// defined higher up, so everything below that has them
// like built-in variables, like name or desc are.

job = "Guard"
hint = "I know where an adventurous person can find a wealth of gold...."
angry = "Don't make me throw you in the dungeon!"


Merchant // Lets throw a fish merchant in here too

job = "Fish Merchant"
hint = "I have a fine selection of red herrings fresh from the coast."
angry = "Back you feind, or I shall smack you with this smelly trout!"

verb // We'll give players a way to buy fish from him
Buy() // Only this NPC will have a Buy verb
set src in oview()
src << "You purchased a fat fish from the merchant."


~X
In response to O-matic
I think I finally figured out what you want Mashed.
something like:
[code]
mob/Player
var/blah
mob/GM/verb/Boot(M as mob/Player in view())
del(M)
[/code]

You make the player mobs mob/Player. This way it won't show up. I think this works, haven't tested it.