Shattered Kingdoms

Where Roleplay and Tactics Collide
VOTE NOW!
It is currently Mon Nov 25, 2024 3:49 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 231 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 24  Next
Author Message
 Post subject:
PostPosted: Tue Aug 26, 2003 12:06 pm 
Offline
Mortal

Joined: Fri Mar 01, 2002 4:00 pm
Posts: 128
Location: Somerset, UK
just a little example of what to do if you want to use the same alias to do diffrent things.

example have "cl" cast cause light if a necro or cast cure light if a priest


Code:
#ALIAS cl {#if (@class==Necromancer) {cast 'cause light' %1};#if (@class==Shaman) {cast 'cure light' %1};#if (@class==Priest) {cast 'cure light' %1};#if (@class==Hellion) {cast 'cause light' %1}}

#VAR class {nill}
#TRIGGER {Class: (%w)} {#var class %1}


everytime you type score it will grab what class you are and keep that stored and when you ust the cl alias it will sort out which spell to use.

cl <target>


Top
 Profile  
Reply with quote  
 Post subject: Sticky.
PostPosted: Wed Sep 03, 2003 9:59 am 
Can we make this topic a sticky??

It has a ton of useful info.


Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 04, 2003 7:19 pm 
Offline
Webadmin

Joined: Thu Feb 28, 2002 4:00 pm
Posts: 2732
Location: Australia
SK Character: Viltrax
Mira wrote:
Anyone know how to keep #GAG'd lines, now empty, from spamming the screen, and without losing any information?


Blank lines are easily gagged using the beginning of line marker (^) and end of line marker ($) together. I don't have zmud here at present, but it would look something like:

#TRIGGER {^$} {#GAG}

This saves lots of space in your client screen, but tends to mash paragraphs together (help text, descriptions, etc).

- Alshain.

PS: The ^ and $ markers can be used to improve the efficiency of many existing triggers, since zMUD will know *exactly* where the text will appear, and won't spend time searching for trigger text in the middle of lines.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 18, 2003 2:31 pm 
Offline
Webadmin

Joined: Thu Feb 28, 2002 4:00 pm
Posts: 2732
Location: Australia
SK Character: Viltrax
The SKBase/EZ zMUD pack took off big time and kind of hijacked this thread, so I split away all the posts related to it, to the thread below:

http://www.shatteredkingdoms.org/forums ... php?t=5736

Please resume discussion of legal zMUD scripts.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 22, 2003 6:54 am 
Offline
Mortal

Joined: Fri May 16, 2003 10:02 am
Posts: 100
Location: Working like a dog
Code:
#CLASS {SKBase|Control|Misc|VoteReminder}
#VAR lastVote {22-9-2003-17-31-46}
#ONINPUT {who} {
  #mss {"function timeToVote(lastVote) { lastVote = lastVote.split('-'); now = new Date; lastVote = new Date(lastVote[2], (lastVote[1]-1), lastVote[0], lastVote[3], lastVote[4], lastVote[5]); nextVote = new Date(lastVote); nextVote.setHours( nextVote.getHours() + 12); retVal = (nextVote < now) ? 1 : 0; return retVal;}"} {javascript}
  #mss {"function votedAt() {now = new Date; retVal = now.getDate() + '-' + (now.getMonth()+1) + '-' + now.getYear() + '-'; retVal += now.getHours() + '-' + now.getMinutes() + '-' + now.getSeconds(); return retVal; }"} {javascript}
  #if (%mss( %concat( "timeToVote('", @lastVote, "')"))) {
 #yesno {You can vote on topmudsites, do you wish to vote now?} {
      Yes: lastVote = %mss( "votedAt()")
      #url {"http://www.topmudsites.com/cgi-bin/topmuds/rankem.cgi?id=dulrik"}
      } {No:}
    }
  #mss {}
  } "" {notrig}
#CLASS 0


This code snippet will be in SkBase v1.3, but I thought I'd post it here too in case you just want to use it in your Zmud script.

It uses embedded javascript in the Zmud script (because Zmud can't handle dates and times well) and everytime you type 'who' it checks if it's more than 12 hours since your last vote on topmudsites. It is time/date based so it ensures you are prompted to vote every 12 hours.

After 12 hours has expired, a prompt pops up, clicking Yes (you want to vote) redirects you to the URL to vote for SK and updates the 'lastVote' variable to the current date and time , clicking No does not update the variable (which means you get reminded until you vote :P)

Hope this is useful to you.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 22, 2003 3:14 pm 
Offline
Mortal

Joined: Thu Feb 28, 2002 4:00 pm
Posts: 677
Location: The great white north
I dont know Javascript at all, so I am not going to suggest any changes to your code, but I copied the script into zmud and changed the path from {SKBase|Control|Misc|VoteReminder} to {VoteReminder} and I keep getting an error stating that

"lastVote2 is undefined (error 5009) on line 1 column 81"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Sep 28, 2003 1:11 pm 
Offline
Mortal

Joined: Fri May 16, 2003 10:02 am
Posts: 100
Location: Working like a dog
When you paste the script into Zmud it strips the square brackets out.

The answer is to edit the lastVote2, lastVote3 etc. to read lastVote[2] and lastVote[3] etc.

Version 1.3 of the scripts are out now and include this trigger in the Misc class.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 09, 2003 8:02 pm 
Offline
Webadmin

Joined: Thu Feb 28, 2002 4:00 pm
Posts: 2732
Location: Australia
SK Character: Viltrax
For those who dislike zMUD prompts and prefer the 'just do it' approach, the code below is identical to boo's example, except it won't ask you whether you wish to vote... it just launches the vote window immediately (and assumes that you WILL vote).

Code:
#MSS {"function timeToVote(lastVote) { lastVote = lastVote.split('-'); now = new Date; lastVote = new Date(lastVote[2], (lastVote[1]-1), lastVote[0], lastVote[3], lastVote[4], lastVote[5]); nextVote = new Date(lastVote); nextVote.setHours( nextVote.getHours() + 12); retVal = (nextVote < now) ? 1 : 0; return retVal;}"} {javascript}
#MSS {"function votedAt() {now = new Date; retVal = now.getDate() + '-' + (now.getMonth()+1) + '-' + now.getYear() + '-'; retVal += now.getHours() + '-' + now.getMinutes() + '-' + now.getSeconds(); return retVal; }"} {javascript}
#IF (%mss( %concat( "timeToVote('", @lastVote, "')"))) {
  lastVote = %mss( "votedAt()")
  #URL {"http://www.topmudsites.com/cgi-bin/topmuds/rankem.cgi?id=dulrik"}
  }
#MSS {}


(note: this example assumes you already have the trigger defined as per the previous post - the text above should be pasted into the existing trigger command area)

Just thought I'd post this (a) because it is what I use, and (b) because we were consistently in the top 10 for the first few days after the reset, so we've got some very good voters out there already, but we need more!

Thanks to all who vote.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 23, 2004 4:05 am 
Offline
Mortal

Joined: Fri Jan 17, 2003 5:21 pm
Posts: 1174
Location: Dänimarka
I have a slight problem. For instance, with Myfawny's time script, that i like alot by the way, i cannot figure out how to move the little time button. Or basicly all buttons that only have a picture... How do you do that?

JeanV


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 27, 2004 1:19 pm 
Offline
Mortal

Joined: Fri May 16, 2003 10:02 am
Posts: 100
Location: Working like a dog
JeanValjean wrote:
I have a slight problem. For instance, with Myfawny's time script, that i like alot by the way, i cannot figure out how to move the little time button. Or basicly all buttons that only have a picture... How do you do that?

JeanV


Right click the button and go to the properties of it, uncheck the Auto Position setting if it's set and then use the X and Y coordinates to set the location for the button.

boo (a.k.a. Myfanwy)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 231 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 24  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 34 guests


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

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group