ID:167049
May 8 2006, 11:37 am
|
|
How do i add cheat words that you type into the 'say' thing and it like increases your wealth or your hp no matter how many times you put it in?
|
May 8 2006, 11:43 am
|
|
if you have a proc for say this might work(..not sure if it will work...just trying to help.)
|
In response to Dragon_Fire6564
|
|
how do you make a proc for say?
|
In response to VolksBlade
|
|
mob/proc/Say(T as text) |
In response to VolksBlade
|
|
mob/proc/Say(msg as text) thats the proc mob/verb/say() thats the verb with the proc being called |
mob/verb/Say(T as text) |
client/command_text="say \"" //automatically press the speech bubble upon login for you If you want it to be one-use only, see this example: client/command_text="say \"" //automatically press the speech bubble upon login for you I'll give you a warning: if you use the former, you will most likely get players who find out that by typing "I like this game." they get 10 gold and start spamming it to keep getting 10 gold. 01000100011000010111010001100001 |
The easiest way is just to use the 'set hidden = 1' setting for verbs.
|
In response to Android Data
|
|
My only concern in your code Andriod Data is the dd_replacetext(). I'm pretty sure that isn't a built in proc.
What library did you use? |
In response to Crzylme
|
|
Crzylme wrote:
My only concern in your code Andriod Data is the dd_replacetext(). I'm pretty sure that isn't a built in proc.Whoops. I directly copied/pasted it, because I use it in all of my projects. It uses hub://Deadron.TextHandling, which is a free library. Alternatively, you can remove the dd_replacetext() entry, but this will allow players to use the \n macro to create newlines, which can be used for spamming purposes. |
In response to Foomer
|
|
Foomer wrote:
The easiest way is just to use the 'set hidden = 1' setting for verbs.Granted, my method uses five extra characters (oh my!), your method is not so handy: the say verb will not appear in the command list if you press the spacebar without any command entered, but will instead have to be typed in it's entirity because it's invisible. By using set category=null, the verb remains visible in the list, making command inputs easier. For instance, some people want to have the speech bubble button turned off and type "sa <SPACE>" to begin writing a message. For these people, it would not be in their favor if the say verb would be hidden. The set hidden=1 instruction should only be used if you want to hide the verb entirely. Please, get rid of your habit. |
In response to Android Data
|
|
I believe what foomer means is:
mob/verb/CheatCode() set hidden = 1 src.gold+=1000000000 |
In response to Airjoe
|
|
I'm pretty sure thats what I meant, but I'm still trying to figure out what HE meant.
|
In response to Foomer
|
|
I agree. No idea why people would use procs and stuff.
|
In response to Foomer
|
|
Foomer wrote:
I'm pretty sure thats what I meant, but I'm still trying to figure out what HE meant.He ment that if a player says something, the player gains HP, and if the player says something else the player gains money. set hidden=1 would be useful for the purpose of hiding the cheatcodes if they were all seperate verbs, but they're not; they're called if you speak a naughty word. |
mob |
In response to Evidence
|
|
Evidence wrote:
> mob 1. It was already answered. 2. You don't prevent HTML from being used, you just discard the message if there's a newline in it (sometimes it happens accidental), you mistyped [usr] and someone may say "if you say cheatzz then you get 10 health" and it'd still return, which is annoying, espessially for Volks if he wants to tell others a cheat. The only good thing I can find using your method is the lowertext() which makes things easier, but even then, most cheatcodes would probably have different caps in them to make it harder to guess. 3. For Volks: yes, it would be better if the cheatcodes were a part of the name of the player, to make things harder to guess. Such a system would be easy to create. |
In response to Android Data
|
|
The lowertext() in there is bogus anyway.
findtext() treats all letters lowertext to begin with, FindText() on the other hand is case-sensitive. |
In response to Smoko
|
|
Depends on how everything is being called. I normally call most things though procs because they get called by things like Topic(), Login(), and a few other built in procs. So you just pass info from verb/Say() to proc/RSay() or something like that.
|
In response to Android Data
|
|
Ah. I was understanding his reference to the "'say' thing" as meaning the bar where you type stuff in.
|