Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Jaiven
Wanderer


Joined: 03 Oct 2007
Posts: 66

PostPosted: Tue Jul 03, 2012 9:12 pm   

PK Script
 
Another ZMUD to CMUD conversion problem. Worked flawlessly in zmud and in CMUD it mades a %1 has arrived trigger instead of a (insert name here) has arrived trigger.

Code:


<trigger priority="4200" id="431">
  <pattern>^## YOU were just DEFEATED in battle by (%w)!$</pattern>
  <value>pkadd %1
pkshow
ct I was killed in  @place
halt
#BEEP
#var onpked 0
stand
say Killed by: %1
say Player: %1 added to pk bot.
#alarm +60 {
  say Resetting data
  e
  n
  n
  n
  sleep
  }</value>
</trigger>


Code:

<alias name="pkadd" id="517">
  <value>#CLASS pk
#additem pkperson %1
#trigger {^*%1* has arrived.} {
  banded %1
  prevents
  }
#trigger {^*%1* is * here.} {
  banded %1
  prevents
  }</value>
</alias>


P.S. for those that don't like bots. It isn't a real bot it just pisses players in game off when I say that.
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Tue Jul 03, 2012 9:43 pm   
 
I suppose the actual MUD line is something like

Code:

*Charles* has arrived.


Usage of %1 is incorrect and while it worked on ZMud, CMud is more strict with bad syntax. Hence, correct would be:

Code:

#trigger {^~*(%w)~* has arrived.} {
banded %1
prevents
}


Don't know what the asterix in second trigger symbolizes, but if it's the same sort surrounding the name, need to escape that,
if not, more details are needed (if it's some variable word, etc) to refine the capture.
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jul 03, 2012 9:47 pm   
 
Err, you're using triggers to handle the automated attacking of another player. That, by definition, is a bot. Bots are not always elaborate creations of AI scripting genius that make other players drool and go "I SO want that!". That said, it doesn't matter if it's a bot or not here if the rules there say you can legally use this script.

By the way, I'm pretty sure you cannot in that game.
_________________
EDIT: I didn't like my old signature
Reply with quote
Jaiven
Wanderer


Joined: 03 Oct 2007
Posts: 66

PostPosted: Tue Jul 03, 2012 9:56 pm   
 
MattLofton wrote:
Err, you're using triggers to handle the automated attacking of another player. That, by definition, is a bot. Bots are not always elaborate creations of AI scripting genius that make other players drool and go "I SO want that!". That said, it doesn't matter if it's a bot or not here if the rules there say you can legally use this script.

By the way, I'm pretty sure you cannot in that game.


The game is called Nodeka and yes, yes you can use a pk script / bot. You can actually bot anything there except the bot checker. Also, thanks for the help other guy.
Reply with quote
Jaiven
Wanderer


Joined: 03 Oct 2007
Posts: 66

PostPosted: Tue Jul 03, 2012 10:04 pm   
 
Progonoi wrote:
I suppose the actual MUD line is something like

Code:

*Charles* has arrived.


Usage of %1 is incorrect and while it worked on ZMud, CMud is more strict with bad syntax. Hence, correct would be:

Code:

#trigger {^~*(%w)~* has arrived.} {
banded %1
prevents
}


Don't know what the asterix in second trigger symbolizes, but if it's the same sort surrounding the name, need to escape that,
if not, more details are needed (if it's some variable word, etc) to refine the capture.


Yes it would be like this, Uda has arrived. but people can put words in front and after their name so there has to be * and * before and after when it makes the trigger. The first trigger where you die shows only their real name so it adds it from that. the second * in one of them is because resting here and standing here are pretty much the same.
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Tue Jul 03, 2012 10:06 pm   
 
Other guy says you're welcome.

(So many botters from Nodeka these days, should get my act together and check it out at last...)
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Jaiven
Wanderer


Joined: 03 Oct 2007
Posts: 66

PostPosted: Tue Jul 03, 2012 10:09 pm   
 
It looks like the alias pkadd isn't working. it used to work where pkadd rar would take the name rar and throw it down into the %1 when making the trigger so the trigger would come out like rar is standing here and rar has arrived. That is the part that I can't figure out how to fix which is making an alias make a trigger with a variable in it based on what I just typed for that variable i guess.
Reply with quote
Jaiven
Wanderer


Joined: 03 Oct 2007
Posts: 66

PostPosted: Tue Jul 03, 2012 10:12 pm   
 
Nodeka is a really fun game Progonoi but you can't really bot in the sense of never being at your computer. bot checks are random and every 15 mins or so which gives you time to go do something but if you fail you can't play for like 4 days. Nodeka allows heavy scripting but no real full botting. It has a really fun invasion system and cool crafting too.
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Tue Jul 03, 2012 11:43 pm   
 
Sounds good, Jaiven.

About your script, I'm dumb. I don't know how I didn't notice that you've #triggers WITHIN your #alias code.
Also, you've #class there which I don't understand, at all. That's um, not the way to do things.
All this odd setup might've worked in ZMud, but I'm not surprised CMud spits it out.

New and improved (something might be amiss as I've not cscripted for years...):

Code:

#alias {pkadd} {#additem pkperson %1}
#trigger {^~*(%w)~* has arrived.} {#if ((%item(%1, pkperson)=1) {banded %1; prevents}}
#trigger {^~*(%w)~* is ~* here.} {#if ((%item(%1, pkperson)=1) {banded %1; prevents}}



As I understand it, your first block of code adds a person to your kill roster after he has killed you, etc. That's what
pkadd alias is for, it doesn't need anything other than #additem. Now, these two triggers I singled out here
which have no place in your pkadd alias is what I'd imagine trigger the fight if you see someone in the "pkperson" variable
standing/arriving. Your present code appears to be automatic attacking but you'd also need a check to make sure
the person is attackable (belongs to the aforementioned list). That's what the #if check is for. It checks whether the "%1"
can be accounted for in the list.

I'm unsure, for the reasons noted above, if the %item syntax is correct. But the idea is there for you to work on.


Cheers.
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jul 04, 2012 12:03 am   
 
The problem with your code, Progonoi, is that it continually creates a new trigger.

I believe the original code was meant to create a new trigger with the player's name. Therefore, I suggest this:

Code:
#TRIGGER {~*({@pklist})~* {has arrived|is here}.} {banded %1;prevents}
#ALIAS pkadd {#ADDITEM pklist %1}


Now you have one trigger, and a variable within the trigger that you can continue to add names to.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net