Could there be an atom/var to block the Dream Seeker .click command (or maybe even only macros of it) for that atom, to force people to actually click things rather than have a pre-made macro of the .click command?
The only workaround I can think of for this is to randomly modify the 'name' variable. :\
ID:134259
Dec 20 2006, 4:13 pm
|
|
In response to DarkCampainger
|
|
DarkCampainger wrote:
> mob/verb/ClickBlock() I love object-oriented programming ^_^ It works?! I don't think so, because the command goes like ".click atom-name", not just ".click"...so it shouldn't block it. Also, if it works, it blocks it for ALL atoms...this var is for blocking specific ones (let's say I don't want players to be able to use click macros on my Catch-a-Mole minigame, but I wanna allow them to use it on other things if they wish). |
In response to Kaioken
|
|
mob/icon='T.dmi' Tested and works fine. Let's you click both apples and Moles, lets you macro clicking the apples, but doesn't let you macro clicking the moles. :p |
In response to DarkCampainger
|
|
Damn, I'm an idiot, I forgot that arguments are supplied to verbs just like that! *smacks head* This is what I get for not sleeping enough.
The actual code could be improved, though; #define SNG_CLICK 1 //define bits Nevertheless, thanks! :) Note: You can't use 'in view()' in the argument definition thing. It will cause runtime errors when you try to use command autocomplete on .click (if you have an object named "grass",type in commandline '.click gra' and press space). This way works fine, even if there are tons of objects named "thing" on the world, and you do ".click thing" in the command line, it will only choose one in view (not sure why it does this despite the argument missing, but hey, I'm not complaining :D). And the autocomplete still works. Though, this snippet isn't perfect. Look in the reference: The Click() procs have an argument; now, I'm not sure, I MAY of successfully imitated the loc-part of it by calling with the 'A.loc' ; however I haven't, and I can't, imitate the useful if-object-in-statpanel-set-arg-to-statpanel-name part, so if people rely on this arg in their game this will break their code. So my suggestion to add this as built-in is still in place. (However, pleasant reader, if you don't use the Click() statpanel-name arg in your game, then you can use this workaround safely.) |
I love object-oriented programming ^_^