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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
flashstar_2000
Beginner


Joined: 24 Nov 2003
Posts: 11

PostPosted: Mon Nov 24, 2003 11:39 pm   

Zmud Slow Walking
 
Ok this is my prob, i wanna make a script for running an area, but it always moves me when i dont want it to walk, it moves me. I have the script using the #ok command when its done. Is there a way to change that?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Nov 25, 2003 12:11 am   
 
Of course, stop using the #OK when you're done. Beyond that, you're going to have to get much more detailed than you have been thus far.
Reply with quote
flashstar_2000
Beginner


Joined: 24 Nov 2003
Posts: 11

PostPosted: Tue Nov 25, 2003 2:19 am   
 
Ok this is what I've done, this is going to be detailed lol.

Made an alias to start off : with tog map, then #slow <the directions>, then when it when it moves, it triggers the [Exits : trigger which first #waits 1500 to let the rest load, and starts nimming (stealing gold) from the monsters there. then when the monster variable equals 0, it types #ok to move. There are several other triggers for the monsters which add 1 to an orc variable. Now when it gets going, it gets to a point when it starts jumping 2 spaces at a time and doesnt allow the script to nim the monsters it skipped because the slow walk went an extra space. How can i set it so that i would only move through slow walk on the #ok command?
Reply with quote
flashstar_2000
Beginner


Joined: 24 Nov 2003
Posts: 11

PostPosted: Tue Nov 25, 2003 2:49 am   
 
Script :
#CLASS {Outpost}
#ALIAS startall {tog map;#var orc 0;#var orccor 0;#slow esesesesesesesesesesenenenenenenenenenenenwnwnwnwnwnwnwnwnwnwnwswswswswswswswswswsw2esene3se5ne7se9ne11se13ne5se5ne8s2ws2es2ws2es2w3se2n2e11ne9se7ne5se2n3en3w2n}
#ALIAS reg {tog map;#wait 5000;regen;regen;regen;regen;regen;regen;regen;regen;tog map;look}
#ALIAS startmid {tog map;#var orc 0;#var orccor 0;#slow 3ene3se5ne7se9ne11se13ne5se5ne8s2ws2es2ws2es2w3se2n2e11ne9se7ne5se3n3es3w}
#TRIGGER {^An orc raider is here training for combat.} {#add orc 1}
#TRIGGER {^An orc valkyrie is here training for combat.} {#ad orc 1}
#TRIGGER {^An orc barbarian is here training for combat.} {#add orc 1}
#TRIGGER {^An orc tracker is here searching for something.} {#add orc 1}
#TRIGGER {^A powerful orog stands here.} {#add orc 1}
#TRIGGER {^An orc marauder is here training for combat.} {#add orc 1}
#TRIGGER {^~[Exits: *]} {#stop;#wait 5000;#if (@orc>=1)&(!@move) {nim @{orc}.o;#ad orc -1};#if (@orc=0) { #var move 1};#if (@move) {#var move 0;#ok}}
#TRIGGER {^*falls to the ground! * is dead!} {#add orccor 1;get all,@{orccor}.cor}
#TRIGGER {^Thieving experience gained:*} {#if (@orc!=0) {nim @{orc}.o;#add orc -1} { #while (@orccor<>0)&(@orccor>0) {get all,@{orccor}.o;#ad orccor -1}};#if (@orc=0) {#var move 1;look}}
#TRIGGER {^A group of ~[ %1 ] o*} {#ad orc %1}
#TRIGGER {^Unfortunately * is completely broke. How sad...} {#if (@orc!=0) {nim @{orc}.o;#add orc -1} { #while (@orccor<>0)&(@orccor>0) {get all,@{orccor}.o;#ad orccor -1}};#if (@orc=0) {#var move 1;look}}
#CLASS 0

Output:
Inside the Orcish Outpost




,!`
| |
,!`-, `-,!`
| | | |
,?`-,#`-, `-,!`-,!`-
| |
,!` ,!`
|





[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3627/3641] -->
[ Zorp would surely enjoy a run. gossips ]: 'you're suppossed to be cutting down.. *mutter* fatty..'

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3627/3641] -->tog map
e

Auto-Peripheral is now OFF.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3627/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east south west]
Slow walking aborted

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3626/3641] -->e
s


Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east south west]
Slow walking aborted
A powerful orog stands here.
A zombie in the form of a necromancer staggers towards you.
## Mutiny has joined the citadel for his challenge against Orlijn!

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3623/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north south west]
Slow walking aborted
An orcish vagrant wanders around begging for food.
A zombie in the form of a necromancer staggers towards you.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3622/3641] -->tog map

Auto-Peripheral/Map is now ON.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3622/3641] -->
[ Sagrin gossips ]: 'BUT I NEEDS THE CAKE'

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3622/3641] -->nim 1.o
s
e
s

Unfortunately a vagrant orc is completely broke. How sad...
look

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3587/3641] -->

Example 2:
Inside the Orcish Outpost




,!`
| |
,!`-, `-,!`
| | | |
,?`-,#`-, `-,!`-,!`-
| |
,!` ,!`
|





[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3623/3641] -->
Tokien has arrived.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3623/3641] -->
Tokien looks around in search of someone.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3623/3641] -->tog map
e

Auto-Peripheral is now OFF.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3623/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east south west]
Slow walking aborted

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3622/3641] -->e
s


Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east south west]
Slow walking aborted
A powerful orog stands here.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3619/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north south west]
Slow walking aborted
An orcish vagrant wanders around begging for food.
A zombie in the form of a necromancer staggers towards you.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3618/3641] -->s
e
s


Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east]
Slow walking aborted
A group of [ 2 ] orc soldiers, look for something to kill.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3617/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: east south west]
Slow walking aborted
A zombie in the form of a necromancer staggers towards you.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3614/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east]
Slow walking aborted
A group of [ 2 ] orc soldiers, look for something to kill.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3611/3641] -->nim 2.o
nim 1.o
s
e
s

Unfortunately an orc soldier is completely broke. How sad...
look

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3576/3641] -->
Unfortunately an orc soldier is completely broke. How sad...
look

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3541/3641] -->
Alas, you cannot go in that direction.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3541/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north south west]
Slow walking aborted

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3540/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east]
Slow walking aborted
A group of [ 2 ] orc soldiers, look for something to kill.
A powerful orog stands here.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3539/3641] -->
Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east]
Slow walking aborted
A group of [ 2 ] orc soldiers, look for something to kill.
A powerful orog stands here.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3539/3641] -->
Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east]
Slow walking aborted
A group of [ 2 ] orc soldiers, look for something to kill.
A powerful orog stands here.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3539/3641] -->TICK IN 5 SECONDS.
Slow walking aborted
tog map

Auto-Peripheral/Map is now ON.

[Reply: Pagan] [Exp: 1320648] [Align: 1000] [Gold: 249942] []
[H:2416/2416] [M:264/264] [S:614/614] [E:3539/3641] -->m


As you can tell, it goes one space, then 2 then 3 and so on.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Nov 25, 2003 11:36 pm   
 
quote:

#TRIGGER {^~[Exits: *]} {#stop;#wait 5000;#if (@orc>=1)&(!@move) {nim @{orc}.o;#ad orc -1};#if (@orc=0) { #var move 1};#if (@move) {#var move 0;#ok}}



I'm not bothering with execution and how it may or may not be improved upon, but since this is the only trigger with a #WAIT command in it it's likely the culprit of your problem. The problem with #wait is that it completely stops the operation of ZMud's parser for the specified amount of time. This seriously messes up the timing of trigger scripts and subsequently run you through a lot of useless action as ZMud hurries to catch up. This is exactly why everyone who knows tells the ignorant not to use #WAIT in a trigger.

You will want to modify this trigger so that it either creates an alarm (containing all the code after the #WAIT), or employs the wait-state portion of a multi-state trigger:

quote:

#TRIGGER {^~[Exits: *]} {#stop;#alarm +5000 {#if (@orc>=1)&(!@move) {nim @{orc}.o;#ad orc -1};#if (@orc=0) { #var move 1};#if (@move) {#var move 0;#ok}}}

Reply with quote
flashstar_2000
Beginner


Joined: 24 Nov 2003
Posts: 11

PostPosted: Wed Nov 26, 2003 4:17 pm   
 
Ahhh... i see, i shall try this when i get home from school.
Reply with quote
flashstar_2000
Beginner


Joined: 24 Nov 2003
Posts: 11

PostPosted: Thu Nov 27, 2003 3:31 am   
 
Inside the Orcish Outpost
A group of [ 2 ] outpost guards, attempt to block your passage.




,!`
| |
,!`-,!`-, `
| | | |
,?`-,#`-,!`-, `-,!`-
| |
,!` , `
|





[Reply: Flashstar] [Exp: 20588761] [Align: 999] [Gold: 145548] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3621/3641] -->tog map

Auto-Peripheral is now OFF.

[Reply: Flashstar] [Exp: 20588761] [Align: 999] [Gold: 145548] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3621/3641] -->tog map

Auto-Peripheral/Map is now ON.

[Reply: Flashstar] [Exp: 20588761] [Align: 999] [Gold: 145548] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3621/3641] -->tog map
e

Auto-Peripheral is now OFF.

[Reply: Flashstar] [Exp: 20588761] [Align: 999] [Gold: 145548] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3621/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east south west]
Slow walking aborted
A pack of [ 2 ] zombie necromancers, stand here rotting.
A powerful orog stands here.

[Reply: Flashstar] [Exp: 20588761] [Align: 999] [Gold: 145548] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3620/3641] -->nim 1.o
e
s

You slyly nim 5803 coins from an elite orog guard.
Thieving experience gained: 70299 (+9,005 learn curve bonus).

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3585/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east south west]
Slow walking aborted

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3584/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north south west]
Slow walking aborted

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3583/3641] -->s
e
s


Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east]
Slow walking aborted
A group of [ 2 ] orc soldiers, look for something to kill.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3580/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: east south west]
Slow walking aborted
An orc tracker is here searching for something.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3577/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east]
Slow walking aborted
A group of [ 2 ] orc soldiers, look for something to kill.
An orc tracker is here searching for something.
An orc valkyrie is here training for combat.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3576/3641] -->nim 7.o

There is no one here by that name.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3576/3641] -->nim 6.o

There is no one here by that name.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3576/3641] -->nim 5.o

There is no one here by that name.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3576/3641] -->s
e

Alas, you cannot go in that direction.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3576/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north south west]
Slow walking aborted

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3575/3641] -->nim 4.o

There is no one here by that name.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3575/3641] -->e
s

Alas, you cannot go in that direction.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3575/3641] -->

Inside the Orcish Outpost
You are inside the orcish outpost of Xuvgra. Several large tents surround a
massive battlefield in which many orogs, orcs and half-orcs train their
skills.

[Exits: north east]
Slow walking aborted
A group of [ 2 ] orc soldiers, look for something to kill.
An orc raider is here training for combat.

[Reply: Flashstar] [Exp: 20668065] [Align: 999] [Gold: 151351] []
[H:2326/2326] [M:264/264] [S:614/614] [E:3574/3641] -->nim 6.o

There is no one here by that name.


I did as you said, but it still didnt work, and everytime i typed #ok during the script, it jumped 2 spaces.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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