Search the web
Sign In
New User? Sign Up
dg_scripts · DG scripts
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 1 - 31 of 791   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#31 From: "Welcor" <welcor@...>
Date: Wed Oct 10, 2001 8:41 am
Subject: Re: [DG_SCRIPTS] Updates/script examples
welcor@...
Send Email Send Email
 
----- Original Message -----
From: "jamie nelson" <soulstario@...>
> curious, but will the new patch include...
> -something like '%self.west(room)%' for rooms to return the vnum of the room
> (if any) adjacent in that direction.
> -something like %self.type_is% will return 0, 1, 2 (or anything)
> corrosponding to MOB, OBJ or ROOM.
> -something that will allow objects to have
> 1: next_in_room
> 2: next_in_invantory
> 3: next_in_container
> and a %room.object% (much like the %room.people% var)
> -a math function or a way of doing decimals and fractions without returning
> 0.
>
All very good ideas. This patch, however, is purely an update to Circle
patchlevel 19.
The above will find it's way to dg scripts V.99 pl 8 (or is that 9 now?), which
will
be out in next month.
>
>
> i include a script below that will allow you to put variables into brackets
> in other variables.

Nice :)

Welcor

#30 From: "jamie nelson" <soulstario@...>
Date: Thu Oct 11, 2001 12:36 am
Subject: Re: [DG_SCRIPTS] Updates/script examples
soulstario@...
Send Email Send Email
 
curious, but will the new patch include...
-something like '%self.west(room)%' for rooms to return the vnum of the room
(if any) adjacent in that direction.
-something like %self.type_is% will return 0, 1, 2 (or anything)
corrosponding to MOB, OBJ or ROOM.
-something that will allow objects to have
1: next_in_room
2: next_in_invantory
3: next_in_container
and a %room.object% (much like the %room.people% var)
-a math function or a way of doing decimals and fractions without returning
0.



i include a script below that will allow you to put variables into brackets
in other variables.

for: Mobs
type: greet
narg:100
commands:
%send% %actor% %self.name% steals ALL your money!
*double parsing it makes the %contingency% var look like
* '%self.gold(123456)%' and then the mob sets it as its own.
set contingancy %%self.gold(%actor.gold%)%%
eval mine %contingancy%
set %mine%

This is just a short example, to show how it works...

or even:
for: objects
type: get
commands:
*this checks to see if the actor has a remote variable
*of the value 'id' of the item that the actor just picked up.
set check %%actor.varexists(%self.id%)%%
eval check %check%
if !%check%
eval yay %actor.level%*1000
set gain %%actor.exp(%yay%)%%
set %gain%
*actor gains 1000 times their level exp points
%send% %actor% You gain %yay% experiance for finding this %self.shortdesc%!
set %self.id% 1
remote %self.id% %actor.id%
end




From: "Welcor" <welcor@...>
Reply-To: dg_scripts@yahoogroups.com
To: "DG Scripts Mailing List" <dg_scripts@yahoogroups.com>
Subject: Re: [DG_SCRIPTS] Clearing out variables
Date: Mon, 8 Oct 2001 14:09:53 +0200

----- Original Message -----
From: "Steven R. Hatfield" <ashari@...>
  >
  > Where can I get the latest DG Scripts patch with Oasis?
  >

Hold on a day or two. Almost got the new patch ready (both with and without
oasis).
Currently bugfixing it. When it's ready, both this list, and the Circle
discussion
group will be notified.

Welcor





_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

#29 From: "jamie nelson" <soulstario@...>
Date: Wed Oct 10, 2001 3:56 am
Subject: Fun Script2!
soulstario@...
Send Email Send Email
 
the {c<letter> parts are my muds color variables.
they can be taken out or replaced.
Here is a very very very cool script.
test it out!
*hint hint*
-Ciao Bella

name: Soulstar's Visual Mob HitPoint Scale
for: mobiles
type: Fight
narg: 100
arg:
Commands:
eval a ((%self.hitp%*20)/%self.maxhitp%)
eval per ((%self.hitp%*100)/%self.maxhitp%)
set n 0
while (%n%<%a%)
set scale %scale%#
eval n (%n%+1)
done
set scale %scale%{cR|{c0
eval n (%a%+1)
while (%n%<21)
set scale %scale%{cy={c0
eval n (%n%+1)
done
%echo% [ {cG%scale%{c0 ] [at %per%%%] (%self.name%)


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

#28 From: "jamie nelson" <soulstario@...>
Date: Wed Oct 10, 2001 3:52 am
Subject: Fun Script!
soulstario@...
Send Email Send Email
 
This is a very simple script that i have used in alot of things,
Basicly it is just a 12 by 10 vector plotter.
In my otehr scripts i use it as
1) a targeting interface
2) Vector maps
3) co ordanate finding
4) amusing the newbies :-P

So anyway.
have fun with this script:
its a speech script with arg of : var

set width 10
set height 10
set p {cP#{c0
set r {cB@{c0
set o {cC@{c0
if (%speech.car%==var)&&(%speech.cdr%!=0)
extract x 2 %speech%
extract y 3 %speech%
else
eval x %random.10%
eval y %random.10%
eval random Random Vector.
end
%echo% {c0         [X:%x% Y:%y%] %random%
%echo% {cG  1 2 3 4 5 6 7 8 9 0 1 {c0
eval before (%x%-1)
eval after (%x%+1)
eval upper (%y%-1)
eval lower (%y%+1)
global before
global after
global upper
global lower
while (%hcount%<%height%)
eval hcount (%hcount%+1)
eval 1 %r%
eval 2 %r%
eval 3 %r%
eval 4 %r%
eval 5 %r%
eval 6 %r%
eval 7 %r%
eval 8 %r%
eval 9 %r%
eval 10 %r%
eval 11 %r%
eval around {c00
eval num {cG%hcount%{c0
if ((%hcount%==%upper%)||(%hcount%==%lower%))
eval around 1
elseif (%hcount%==%y%)
eval around 2
end
if ((%around%==1))
eval %x% %o%
%echo% | %1% %2% %3% %4% %5% %6% %7% %8% %9% %10% %11% | %num%
elseif ((%around%==2))
eval %before% %o%
eval %after% %o%
eval %x% %p%
%echo% | %1% %2% %3% %4% %5% %6% %7% %8% %9% %10% %11% | %num%
else
%echo% | %1% %2% %3% %4% %5% %6% %7% %8% %9% %10% %11% | %num%
end
done


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

#27 From: "Welcor" <welcor@...>
Date: Mon Oct 8, 2001 12:09 pm
Subject: Re: [DG_SCRIPTS] Clearing out variables
welcor@...
Send Email Send Email
 
----- Original Message -----
From: "Steven R. Hatfield" <ashari@...>
>
> Where can I get the latest DG Scripts patch with Oasis?
>

Hold on a day or two. Almost got the new patch ready (both with and without
oasis).
Currently bugfixing it. When it's ready, both this list, and the Circle
discussion
group will be notified.

Welcor

#26 From: "Steven R. Hatfield" <ashari@...>
Date: Tue Oct 9, 2001 2:48 am
Subject: RE: [DG_SCRIPTS] Clearing out variables
ashari@...
Send Email Send Email
 
Where can I get the latest DG Scripts patch with Oasis?

Thanks for any help,
Steven

-----Original Message-----
From: Welcor [mailto:welcor@...]
Sent: Sunday, October 07, 2001 7:01 PM
To: dg_scripts@yahoogroups.com
Subject: Re: [DG_SCRIPTS] Clearing out variables



----- Original Message -----
From: "Byron Ellacott" <bje@...>
> On Sat, 6 Oct 2001 brianh@... wrote:
>
> > Any suggestions on what to change? This seems to be a problem with
> > the bundle I downloaded from the CircleMud site. If you want more
> > info, let me know. Using circlemud3.0bpl18 with dg patch level 7.
>
> Without seeing the script in question it's very hard to track down the
> problem.  The %actor% variable is set in dg_triggers.c, on an entry
> trigger you should start searching for calls to entry_mtrigger() and
> making sure they make sense - if it isn't a problem with the script you're
> trying to use.
>
Actually the problem is elsewhere. This is a consequence of a bug dealing
with
GET_ID(ch). In the mentioned bundle, the id is never initialised for
players.
This causes the ADD_UID_VAR macro to make the %actor% var more or less
empty,
causing a match with the first char found, when going through the descriptor
list. The solution, as far as I know, is to add the line

GET_ID(d->character) = GET_IDNUM(d->character);

in interpreter.c, in the nanny() function near enter_player_game(), or even
in
it. You wouldn't want a persons id to change just because s/he logs on/off,
so
this makes sure you have a consistent id. Standard (pl 7) dg scripts allow
you
to have idnums up to 200000 before giving you any trouble, and if you've got
that many players, you should know how to expand the range :P

Welcor



To unsubscribe: dg_scripts-unsubscribe@yahoogroups.com
FAQ / Archives: http://groups.yahoo.com/group/dg_scripts


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#25 From: "Welcor" <welcor@...>
Date: Sun Oct 7, 2001 11:01 pm
Subject: Re: [DG_SCRIPTS] Clearing out variables
welcor@...
Send Email Send Email
 
----- Original Message -----
From: "Byron Ellacott" <bje@...>
> On Sat, 6 Oct 2001 brianh@... wrote:
>
> > Any suggestions on what to change? This seems to be a problem with
> > the bundle I downloaded from the CircleMud site. If you want more
> > info, let me know. Using circlemud3.0bpl18 with dg patch level 7.
>
> Without seeing the script in question it's very hard to track down the
> problem.  The %actor% variable is set in dg_triggers.c, on an entry
> trigger you should start searching for calls to entry_mtrigger() and
> making sure they make sense - if it isn't a problem with the script you're
> trying to use.
>
Actually the problem is elsewhere. This is a consequence of a bug dealing with
GET_ID(ch). In the mentioned bundle, the id is never initialised for players.
This causes the ADD_UID_VAR macro to make the %actor% var more or less empty,
causing a match with the first char found, when going through the descriptor
list. The solution, as far as I know, is to add the line

GET_ID(d->character) = GET_IDNUM(d->character);

in interpreter.c, in the nanny() function near enter_player_game(), or even in
it. You wouldn't want a persons id to change just because s/he logs on/off, so
this makes sure you have a consistent id. Standard (pl 7) dg scripts allow you
to have idnums up to 200000 before giving you any trouble, and if you've got
that many players, you should know how to expand the range :P

Welcor

#24 From: Byron Ellacott <bje@...>
Date: Sun Oct 7, 2001 11:27 pm
Subject: Re: [DG_SCRIPTS] Clearing out variables
bje@...
Send Email Send Email
 
On Sat, 6 Oct 2001 brianh@... wrote:

> Any suggestions on what to change? This seems to be a problem with
> the bundle I downloaded from the CircleMud site. If you want more
> info, let me know. Using circlemud3.0bpl18 with dg patch level 7.

Without seeing the script in question it's very hard to track down the
problem.  The %actor% variable is set in dg_triggers.c, on an entry
trigger you should start searching for calls to entry_mtrigger() and
making sure they make sense - if it isn't a problem with the script you're
trying to use.

--
bje

#23 From: brianh@...
Date: Sat Oct 6, 2001 3:34 am
Subject: Clearing out variables
brianh@...
Send Email Send Email
 
Hey guys and gals,
I am having a problem finding where the code is supposed to clear the
actor variables in dg_scripts. Here is what is happening...
I walk into room...mob says 'blah' Dudley
Someone else walks into room...mob says 'blah' Dudley
Every field is tied to Dudley now (the first char to come into room)
The only way this changes is if I log off, then it picks the next
char down on the who list.
Any suggestions on what to change? This seems to be a problem with
the bundle I downloaded from the CircleMud site. If you want more
info, let me know. Using circlemud3.0bpl18 with dg patch level 7.

Brian

#22 From: "Welcor" <welcor@...>
Date: Sat Sep 22, 2001 9:37 pm
Subject: Re: [DG_SCRIPTS] A question about mhunt
welcor@...
Send Email Send Email
 
----- Original Message -----
From: <chr.ejlertsen@...>


> I've been trying for a few days to get mhunt to work.
> What i would like is to make the mob hunt for the player, activly,
> and offcourse engage the hunted player on sight.

The following script will do the trick:

Trigger Intended Assignment: Mobiles
Trigger Type: Bribe , Numeric Arg: 1, Arg list: None
Commands:
    %echo% Sleeping for 10 secs, giving %actor.name% a head start.
    sleep
    %echo% Targetting %actor.name%
    mhunt %actor%
    wait 10 s
    wake
    stand
    %echo% Hunting...

I tested mhunt with this script and it worked fine. The actual hunting
is done through setting HUNTING(ch) to the target, causing the mob to
hunt on next PULSE_MOBILE. (called via mobact.c -> graph.c:hunt_victim())

> Is this possible with the triggers or is this a new thing that needs
> to be coded. If so give me a hint to what i could do.

mhunt will target both mobs and players anywhere in the world, except
invis gods. Nothing new needs to be added.

Welcor

#21 From: chr.ejlertsen@...
Date: Sun Sep 23, 2001 7:20 pm
Subject: A question about mhunt
chr.ejlertsen@...
Send Email Send Email
 
I've been trying for a few days to get mhunt to work.
What i would like is to make the mob hunt for the player, activly,
and offcourse engage the hunted player on sight.
Is this possible with the triggers or is this a new thing that needs
to be coded. If so give me a hint to what i could do.

Christian

#20 From: dg_scripts@yahoogroups.com
Date: Sat Sep 22, 2001 9:30 pm
Subject: New poll for dg_scripts
dg_scripts@yahoogroups.com
Send Email Send Email
 
Enter your vote today!  A new poll has been created for the
dg_scripts group:

How can DG scripts be improved ?
Which of the below things should be the
main focus of the development of the DG
script language, if you were to decide ?

   o More script types.
   o More variable flexibility.
   o Updating patch to newest available stock code.
   o Bugfixing and stability issues.
   o Documentation and web assistance.


To vote, please visit the following web page:

http://groups.yahoo.com/group/dg_scripts/polls

Note: Please do not reply to this message. Poll votes are
not collected via email. To vote, you must go to the Yahoo! Groups
web site listed above.

Thanks!

#19 From: "molly.4d" <molly.4d@...>
Date: Thu Sep 13, 2001 1:24 pm
Subject: SV: [DG_SCRIPTS] Time loading mobs
molly.4d@...
Send Email Send Email
 
It's dead easy.
I have several zones doing just that, because it looks more realistic.
All you have to do is to just reset one of the mobs. Then set a time script on
that mob to load the other at 6 AM, echo something appropriate, and then goto a
room to purge itself. The new mob in turn has another timescript triggered at 6
PM, doing basically the same thing. This has been working flawlessly for months.
Occasionally there might be a small screw-up at reboot, if a 'night' mob should
happen to load at daytime. Then you may have the wrong mob in for a limited
time, but as soon as the time script triggers it corrects itself.

You can also have a room load the mob in the morning, and put a time trigger on
the mob to purge itself in the evening, if you want it to be independent of
other mobs. below is a simple example.

#1133 room 1128 and 89 time 6
%load% mob 1117
%load% mob 1106
wait until 19:00
%load% mob 1134
%load% mob 1126

#1134 animal day 19
mpurge self

#1135 animal night 06
mpurge self

Molly O'Hara of 4 Dimensions

-----Ursprungligt meddelande-----
Från: j0217995@... <j0217995@...>
Till: dg_scripts@yahoogroups.com <dg_scripts@yahoogroups.com>
Datum: den 13 september 2001 12:08
Ämne: [DG_SCRIPTS] Time loading mobs


>I would like to load some mobs based on the time of the game.  For
>example in a jungle setting I want to load nocturnal animals at night
>and then purge them at daytime and then load day-time creatures at
>night.  Two questions can this be done and if so how?
>
>Thanks,
>
>Scipio (Hexonyx Mud)
>
>
>
>To unsubscribe: dg_scripts-unsubscribe@yahoogroups.com
>FAQ / Archives: http://groups.yahoo.com/group/dg_scripts
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#18 From: j0217995@...
Date: Thu Sep 13, 2001 1:53 am
Subject: Time loading mobs
j0217995@...
Send Email Send Email
 
I would like to load some mobs based on the time of the game.  For
example in a jungle setting I want to load nocturnal animals at night
and then purge them at daytime and then load day-time creatures at
night.  Two questions can this be done and if so how?

Thanks,

Scipio (Hexonyx Mud)

#17 From: Mike Stilson <mstilson@...>
Date: Wed Sep 5, 2001 2:21 am
Subject: Re: [DG_SCRIPTS] Doors
mstilson@...
Send Email Send Email
 
On Mon, Sep 03, 2001 at 09:22:27AM +0000, jamie nelson wrote:
>As far as i know, Mobs cant use the door function.

works fine.  Don't think I modified it.
Only caveat I can think of is probably specific to my mud since I
recoded it to be based on PRF_NOHASSLE instead of levels.
Make sure whoever you're testing with is visible and nohasle is off....

attach this to a mob and say "show me" (helps if the apropriate rooms
exist)


#1200
Door Creation Example (speech, test)~
0 d 0
show me~
say As you wish, %actor.name%.  Your doorway is now open.
%door% 1204 northwest room 100
%door% 1204 northwest flags abe
%door% 1204 northwest name hidden_door
wait 10s
tell %actor.name% Hurry up, %actor.name%.  Your exit is going to close.
wait 5s
%door% 1204 northwest purge
say The door is now closed.
~
#1201
Command Test Trigger~
2 cd 0
test~
wecho Name: %actor.name%
switch %random.2%
case 0
   wecho 0
   break
case 1
   wecho 1
   break
case 2
   wecho 3
   break
default
   wecho default
   break
done
wecho Made it out of switch.
end
~

#16 From: Byron Ellacott <bje@...>
Date: Tue Sep 4, 2001 12:46 am
Subject: Re: [DG_SCRIPTS] Doors
bje@...
Send Email Send Email
 
On Sat, 1 Sep 2001 smkcld@... wrote:

> %door% 878 north a

should be

%door% 878 north flags a

--
bje

#15 From: "jamie nelson" <soulstario@...>
Date: Mon Sep 3, 2001 9:22 am
Subject: Re: [DG_SCRIPTS] Doors
soulstario@...
Send Email Send Email
 
As far as i know, Mobs cant use the door function.
instead you could use 'teleport all'
or have the door already there in redit, and just have the ferry keeper
unlock it (by loading the key to the door and purging it again) and lock it
again after 10 seconds.

alternitively, if you definately want the %door% command, there are ways.
ie: putting a script on the room itself that triggers off the mob when the
mob is bribed that will set the door open and shut.

-Souls



From: smkcld@...
Reply-To: dg_scripts@yahoogroups.com
To: dg_scripts@yahoogroups.com
Subject: [DG_SCRIPTS] Doors
Date: Sat, 01 Sep 2001 15:13:00 -0000

I have a ferryman that requires a bribe to take a player to the other
bank.
1) Name         : Ferryman Bribe
2) Intended for : Mobiles
3) Trigger types: Bribe
4) Numberic Arg : 25
5) Arguments    :
6) Commands:
wait 1 s
mecho After %actor.name% pays Charon's bribe he blows a whistle.
wait 1 s
mecho A ferry emerges from the mist.
%door% 878 north a
%door% 878 north name ferry
%door% 878 north room 897
wait 10 s
%door% 878 north purge
mecho Charon blows his whistle and the ferry disappears.


And this works, however I get an error message.
[ SCRIPT ERR: Mob (Charon, the Ferryman, VNum 805): odoor: invalid
field ]

I'll keep messing with it. It's obvious the problem is in the doors,
and probably bad syntax.  What I don't understand is odoor since this
is a mob trigger. I did try mdoor and it failed. All in all teleport
would be easier, however I am hoping to expand my own knowledge.

The Bad Syntax Imp *cringe*
Dreamer
hystoria.betterbox.net 3030






_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

#14 From: Andrew Cayce <spaceycayce@...>
Date: Mon Sep 3, 2001 4:01 pm
Subject: Re: [DG_SCRIPTS] Doors
spaceycayce@...
Send Email Send Email
 
hey im getting some of my guys to look at it but I
think it may be door flags, I find my hidden doors
sometimes don't work cause of that.  Teleport sounds
like a good idea or even have it echo after you leave
to next room to make it look like the ferry took you
somewhere, Like %echo% The ferry arrives at the other
side dropping you off.
well good luck, I have my script master looking at it
now.
Another Imp on another mud
--- smkcld@... wrote:
> I have a ferryman that requires a bribe to take a
> player to the other
> bank.
> 1) Name         : Ferryman Bribe
> 2) Intended for : Mobiles
> 3) Trigger types: Bribe
> 4) Numberic Arg : 25
> 5) Arguments    :
> 6) Commands:
> wait 1 s
> mecho After %actor.name% pays Charon's bribe he
> blows a whistle.
> wait 1 s
> mecho A ferry emerges from the mist.
> %door% 878 north a
> %door% 878 north name ferry
> %door% 878 north room 897
> wait 10 s
> %door% 878 north purge
> mecho Charon blows his whistle and the ferry
> disappears.
>
>
> And this works, however I get an error message.
> [ SCRIPT ERR: Mob (Charon, the Ferryman, VNum 805):
> odoor: invalid
> field ]
>
> I'll keep messing with it. It's obvious the problem
> is in the doors,
> and probably bad syntax.  What I don't understand is
> odoor since this
> is a mob trigger. I did try mdoor and it failed. All
> in all teleport
> would be easier, however I am hoping to expand my
> own knowledge.
>
> The Bad Syntax Imp *cringe*
> Dreamer
> hystoria.betterbox.net 3030
>
>
>
>
>


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

#13 From: smkcld@...
Date: Sat Sep 1, 2001 3:13 pm
Subject: Doors
smkcld@...
Send Email Send Email
 
I have a ferryman that requires a bribe to take a player to the other
bank.
1) Name         : Ferryman Bribe
2) Intended for : Mobiles
3) Trigger types: Bribe
4) Numberic Arg : 25
5) Arguments    :
6) Commands:
wait 1 s
mecho After %actor.name% pays Charon's bribe he blows a whistle.
wait 1 s
mecho A ferry emerges from the mist.
%door% 878 north a
%door% 878 north name ferry
%door% 878 north room 897
wait 10 s
%door% 878 north purge
mecho Charon blows his whistle and the ferry disappears.


And this works, however I get an error message.
[ SCRIPT ERR: Mob (Charon, the Ferryman, VNum 805): odoor: invalid
field ]

I'll keep messing with it. It's obvious the problem is in the doors,
and probably bad syntax.  What I don't understand is odoor since this
is a mob trigger. I did try mdoor and it failed. All in all teleport
would be easier, however I am hoping to expand my own knowledge.

The Bad Syntax Imp *cringe*
Dreamer
hystoria.betterbox.net 3030

#12 From: "Nate Winters" <wintersn.geo@...>
Date: Tue Aug 28, 2001 11:38 am
Subject: Re: Sacrifice
wintersn.geo@...
Send Email Send Email
 
-----Original Message-----

   I'm begining to understand this.. eval weapon %eq.position(16)%
   assigns the variable 'weapon' the value of the eq.position stored in
   an array 16, which is the wield position, would be my best guess. I
   tryed this and a vast combinations but it has to be %eq.position
   (16)%. You example worked perfectly. However I get a message saying
   something like this. '16'What body part is that? Other than this
   message it works exactly in the room we wanted, with the weapon we
   wanted and ONLY in that room with that weapon. So I'm wondering if
   this might be an internal problem with the coding. I shall have my
   coders look into it.
   Thanks again, I'm in your debt,
   smkcld


   This was a problem I found in the stock dg_script code ;-) can't remember
the specifics off the top of my head and don't have the code infront of me,
but check out where eq.positions are assigned and you'll notice that they
were left unassigned. I did a temp fix that worked fine and then had Welcor
go through it all, so he will know better than I.

   Rumble
   Creator of The Builder's Academy


[Non-text portions of this message have been removed]

#11 From: smkcld@...
Date: Tue Aug 28, 2001 6:09 am
Subject: Re: Sacrifice
smkcld@...
Send Email Send Email
 
I'm begining to understand this.. eval weapon %eq.position(16)%
assigns the variable 'weapon' the value of the eq.position stored in
an array 16, which is the wield position, would be my best guess. I
tryed this and a vast combinations but it has to be %eq.position
(16)%. You example worked perfectly. However I get a message saying
something like this. '16'What body part is that? Other than this
message it works exactly in the room we wanted, with the weapon we
wanted and ONLY in that room with that weapon. So I'm wondering if
this might be an internal problem with the coding. I shall have my
coders look into it.
Thanks again, I'm in your debt,
smkcld
hystoria.betterbox.net 3030


--- In dg_scripts@y..., "Welcor" <welcor@d...> wrote:
>
> ----- Original Message -----
> From: <smkcld@e...>
> > > > I've been trying to make a trigger that will teleport a player
> > > > when they sacrifice a mob in a certain room.
> > > >
> > > The following will do that:
> > >
> > Thank you so very much, yes I had tried to do a death script
> > but never got the syntax right. %self.room% was what I was
missing
> > and your syntax ran perfectly!!! I have found very few websites
> > on DGscript. The best two I've found, either read like stereo
> > instructions or limited in the actual examples. I find examples
> > of syntax help me learn. When Welcor's web site led me here I was
> > so excited to find a place to get real help. I am hoping that
this
> > egroup will offer true examples of triggers and open a discussion
on
> > ways to improve them. I would be more than happy to post some
> > triggers my builders and I have come up with if others are like
me
> > and find examples helpful. I have one more question. If I wanted
to
> > make sure the animal being sacrified with a certain dagger in a
> > certain room.. How would I get it to work?
> > if (%self.room% == 9637 || %actor.wield% == 9518)
> >    %echo% You feel transferred.
> >    %teleport% all 9651
> >    end
>
> Almost there... still a death script, just changed a bit:
> ---v
> * check if the mob was killed, or died by poison or traps
> if !%actor%
>   halt
> end
>
> * find the weapon of the killer
> eval weapon %actor.eq(16)%
>
> * check if there was a weapon
> if !%weapon%
>   halt
> end
>
> * we know there was a weapon
> if (%self.room% == 9637 && %weapon.vnum% == 9518)
>   %echo% You feel transferred.
>   %teleport% all 9651
> end
> ^---
> Note - I haven't tested the above script, but it should work.
>
> Welcor

#10 From: "Welcor" <welcor@...>
Date: Sun Aug 26, 2001 10:11 pm
Subject: Re: [DG_SCRIPTS] Re: Sacrifice
welcor@...
Send Email Send Email
 
----- Original Message -----
From: <smkcld@...>
> > > I've been trying to make a trigger that will teleport a player
> > > when they sacrifice a mob in a certain room.
> > >
> > The following will do that:
> >
> Thank you so very much, yes I had tried to do a death script
> but never got the syntax right. %self.room% was what I was missing
> and your syntax ran perfectly!!! I have found very few websites
> on DGscript. The best two I've found, either read like stereo
> instructions or limited in the actual examples. I find examples
> of syntax help me learn. When Welcor's web site led me here I was
> so excited to find a place to get real help. I am hoping that this
> egroup will offer true examples of triggers and open a discussion on
> ways to improve them. I would be more than happy to post some
> triggers my builders and I have come up with if others are like me
> and find examples helpful. I have one more question. If I wanted to
> make sure the animal being sacrified with a certain dagger in a
> certain room.. How would I get it to work?
> if (%self.room% == 9637 || %actor.wield% == 9518)
>    %echo% You feel transferred.
>    %teleport% all 9651
>    end

Almost there... still a death script, just changed a bit:
---v
* check if the mob was killed, or died by poison or traps
if !%actor%
   halt
end

* find the weapon of the killer
eval weapon %actor.eq(16)%

* check if there was a weapon
if !%weapon%
   halt
end

* we know there was a weapon
if (%self.room% == 9637 && %weapon.vnum% == 9518)
   %echo% You feel transferred.
   %teleport% all 9651
end
^---
Note - I haven't tested the above script, but it should work.

Welcor

#9 From: smkcld@...
Date: Mon Aug 27, 2001 6:42 pm
Subject: Re: Sacrifice
smkcld@...
Send Email Send Email
 
--- In dg_scripts@y..., "Welcor" <welcor@d...> wrote:
>
> ----- Original Message -----
> From: <smkcld@e...>
> > I've been trying to make a trigger that will teleport a player
> > when they sacrifice a mob in a certain room.
> >
> The following will do that:
>
Thank you so very much, yes I had tried to do a death script
but never got the syntax right. %self.room% was what I was missing
and your syntax ran perfectly!!! I have found very few websites
on DGscript. The best two I've found, either read like stereo
instructions or limited in the actual examples. I find examples
of syntax help me learn. When Welcor's web site led me here I was
so excited to find a place to get real help. I am hoping that this
egroup will offer true examples of triggers and open a discussion on
ways to improve them. I would be more than happy to post some
triggers my builders and I have come up with if others are like me
and find examples helpful. I have one more question. If I wanted to
make sure the animal being sacrified with a certain dagger in a
certain room.. How would I get it to work?
if (%self.room% == 9637 || %actor.wield% == 9518)
    %echo% You feel transferred.
    %teleport% all 9651
    end
Of course this isn't working, but I'm sure it is a matter of syntax.
Thanks again for the help,
smkcld
hystoria.betterbox.net 3030


> Trigger intended assignments: Rooms
> Trigger Type: Command , Numeric Arg: 100, Arg list: sa
> Commands:
>    * return 0 to make sure the command goes through
>    return 0
>    if (%cmd.mudcommand%==sacrifice && %arg%==corpse)
>      wait 1
>      %teleport% %actor% 9651
>    end
>
> > Currently the triggers are set like this:
> > Trigger Intended Assignment: Rooms
> > Trigger Type: Enter , Numeric Arg: 100, Arg list: 0
> > Commands:
> >    if (%mob.vnum% == 9628)
> >    attach mtr 9601 Ox
> >    endif
> >
> Why not just attach the script to the ox through the script editor
in
> medit ? This seems to be a lot of work to attach a script that all
the
> oxes will have eventually. Besides, the syntax for 'in-script'
attaching
> is 'attach vnum id'. The above script should be rewritten as:
>
>     if (%mob.vnum% == 9628)
>       attach 9601 %mob.id%
>     endif
>
>
> > Trigger Intended Assignment: Mobiles
> > Trigger Type: Death , Numeric Arg: 100, Arg list: None
> > Commands:
> >    wteleport all 9651
>
> And this one, of course, should be '%teleport% all 9651' since mobs
use
> mteleport, not wteleport.
>
> > I was trying to get the trigger to attach to the mob when it
> > entered the room. And then a trigger on the Ox's death that
> > teleported the players to another room. However the attachment
> > doesn't seen to take hold. Any ideas would be helpful.
>
> Another way of doing the same. Change the above DEATH trigger and
> attach it to all oxes:
>   Trigger Intended Assignment: Mobiles
>   Trigger Type: Death , Numeric Arg: 100, Arg list: None
>   Commands:
>      if (%self.room% == THE_ROOM_VNUM)
>         %echo% You feel transferred.
>         %teleport% all 9651
>      end
>
> This will only teleport the players if the killing is done in the
right
> room, thus letting you just attach the script via medit.
>
> Welcor

#8 From: "Welcor" <welcor@...>
Date: Sun Aug 26, 2001 9:21 am
Subject: Re: [DG_SCRIPTS] Sacrifice
welcor@...
Send Email Send Email
 
----- Original Message -----
From: <smkcld@...>
> I've been trying to make a trigger that will teleport a player
> when they sacrifice a mob in a certain room.
>
The following will do that:

Trigger intended assignments: Rooms
Trigger Type: Command , Numeric Arg: 100, Arg list: sa
Commands:
    * return 0 to make sure the command goes through
    return 0
    if (%cmd.mudcommand%==sacrifice && %arg%==corpse)
      wait 1
      %teleport% %actor% 9651
    end

> Currently the triggers are set like this:
> Trigger Intended Assignment: Rooms
> Trigger Type: Enter , Numeric Arg: 100, Arg list: 0
> Commands:
>    if (%mob.vnum% == 9628)
>    attach mtr 9601 Ox
>    endif
>
Why not just attach the script to the ox through the script editor in
medit ? This seems to be a lot of work to attach a script that all the
oxes will have eventually. Besides, the syntax for 'in-script' attaching
is 'attach vnum id'. The above script should be rewritten as:

     if (%mob.vnum% == 9628)
       attach 9601 %mob.id%
     endif


> Trigger Intended Assignment: Mobiles
> Trigger Type: Death , Numeric Arg: 100, Arg list: None
> Commands:
>    wteleport all 9651

And this one, of course, should be '%teleport% all 9651' since mobs use
mteleport, not wteleport.

> I was trying to get the trigger to attach to the mob when it
> entered the room. And then a trigger on the Ox's death that
> teleported the players to another room. However the attachment
> doesn't seen to take hold. Any ideas would be helpful.

Another way of doing the same. Change the above DEATH trigger and
attach it to all oxes:
   Trigger Intended Assignment: Mobiles
   Trigger Type: Death , Numeric Arg: 100, Arg list: None
   Commands:
      if (%self.room% == THE_ROOM_VNUM)
         %echo% You feel transferred.
         %teleport% all 9651
      end

This will only teleport the players if the killing is done in the right
room, thus letting you just attach the script via medit.

Welcor

#7 From: smkcld@...
Date: Mon Aug 27, 2001 4:57 am
Subject: Sacrifice
smkcld@...
Send Email Send Email
 
I've been trying to make a trigger that will teleport a player
when they sacrifice a mob in a certain room. Maybe I'm going about
it all wrong and someone from here can offer me suggestions.
Currently the triggers are set like this:
Trigger Intended Assignment: Rooms
Trigger Type: Enter , Numeric Arg: 100, Arg list: 0
Commands:
    if (%mob.vnum% == 9628)
    attach mtr 9601 Ox
    endif

Trigger Intended Assignment: Mobiles
Trigger Type: Death , Numeric Arg: 100, Arg list: None
Commands:
    wteleport all 9651
I was trying to get the trigger to attach to the mob when it
entered the room. And then a trigger on the Ox's death that
teleported the players to another room. However the attachment
doesn't seen to take hold. Any ideas would be helpful.
smkcld@...

#6 From: dustlos@...
Date: Thu Aug 16, 2001 7:36 pm
Subject: Hm Well we can post now :)
dustlos@...
Send Email Send Email
 
Hm... well I've temporarily am taking a break from my MUD due to some
frustration but I think I'll hang around here and maybe develop some
dgscripts in my spare time :)

#5 From: "Welcor" <welcor@...>
Date: Wed Aug 8, 2001 10:05 pm
Subject: Re: [DG_SCRIPTS] Food Gone Bad
welcor@...
Send Email Send Email
 
----- Original Message -----
From: "Nate Winters"
>
>    * Note: otransform -1397 did not work as stated in help files, checking
> code I saw no such case.
>

Well - actually this is an oversight in the docs. The '-' operator only makes
sense when calling mtransform, not otransform. The above script could be
rewritten as follows:

if %self.vnum%==1396
   %echo% %self.shortdesc% begins to spoil.
   otransform 1397
end

(where 1396 is unspoilt, and 1397 is poisonous)

> So I looked for another way. To just change the current object to poisoned,
> which I found can be done by the osetvalue command. I did the following:
>
>    Trigger Intended Assignment: Objects
>    Trigger Type: Timer , Numeric Arg: 100, Arg list: None
>    Commands:
>    * This triggers was meant to have food rot after a certain amount of time
>    %echo% %self.shortdesc% begins to spoil.
> *   osetval %self.val0% 1
> *   osetval %self.val1% 1
> *   osetval %self.val2% 1
>    osetval %self.val3% 1
>    detach 1428 %self.id%
>
>    * value 1 is the only one that worked, it is the objects full time. The
> others have no effect.
> [gives the error:]
> [ SCRIPT ERR: Obj (some mistletoe, VNum 1398): osetval: position out of
> bounds! ]
>
> I checked the code for osetval, looked fine to me, if one works... they all
> should. So at this point I'm lost ;-) Any help greatly appreciated.
>
Actually this is because osetval has the following syntax:

osetval <position> <value>

in the above script, the following would do the trick:

osetval 3 1

As a side note, it's possible to make food deteriate further over time. Consider
a TIMER script for an object, as above.

then periodically (every 6 hours, perhaps), the following script is run:

     Trigger Intended Assignment: Objects
     Trigger Type: Timer , Numeric Arg: 100, Arg list: None
     Commands:
       otimer 6
       eval new_poison %self.val3% + 1
       osetval 3 %new_poison%
       %echo% %self.shortdesc% spoils.

This trigger will make a food object poisonous for 1 extra hours, every 6 hours
it's allowed to spoil (ie. not eaten). Depending on the initial value of the
objects timer, this could be run first time after a day or two.

Welcor

#4 From: "Nate Winters" <wintersn.geo@...>
Date: Thu Aug 9, 2001 5:15 pm
Subject: Food Gone Bad
wintersn.geo@...
Send Email Send Email
 
Hello Everyone,

CircleMUD, version 3.00 beta patchlevel 18
DG Scripts Version 0.99 Patch Level 7   12/98

	 So far the list has been pretty quiet. So here is an idea from Kithkan on
The Builder's Academy. He suggested that food should go bad after a certain
amount of time. But our head coder is back logged, so I figured why not do
this with a trigger instead:

My first thought was to simply make an object timer trigger. When the timer
runs out, add the poisoned flag. Then I thought instead (the easier way,
since I didn't know how to change the poisoned flag) to just use the
otransform command, change from one object to another, which worked fine,
but seemed ridiculous to make a second object for every object you want to
rot. Anyways, here is the first attempt:

    Trigger Intended Assignment: Objects
    Trigger Type: Timer , Numeric Arg: 100, Arg list: None
    Commands:
    * This triggers was meant to have food rot after a certain amount of
time, set in object timer under oedit.
    * 1 = 1 mud hour.
    %echo% %self.shortdesc% begins to spoil.
    otransform 1397
    detach 1428 %self.id%

    * Note: otransform -1397 did not work as stated in help files, checking
code I saw no such case.


So I looked for another way. To just change the current object to poisoned,
which I found can be done by the osetvalue command. I did the following:

    Trigger Intended Assignment: Objects
    Trigger Type: Timer , Numeric Arg: 100, Arg list: None
    Commands:
    * This triggers was meant to have food rot after a certain amount of time
    %echo% %self.shortdesc% begins to spoil.
*   osetval %self.val0% 1
*   osetval %self.val1% 1
*   osetval %self.val2% 1
    osetval %self.val3% 1
    detach 1428 %self.id%

    * value 1 is the only one that worked, it is the objects full time. The
others have no effect.

Help file says:
FOOD
      value 0: The number of hours of hunger satisfied by this food.
      value 1: unused
      value 2: unused
      value 3: Non-zero if the food is poisoned, 0 otherwise.

I changed object type to POTION and tried all values again, val0 and val2
worked. The others gave the error:
[ SCRIPT ERR: Obj (some mistletoe, VNum 1398): osetval: position out of
bounds! ]

I checked the code for osetval, looked fine to me, if one works... they all
should. So at this point I'm lost ;-) Any help greatly appreciated.

Rumble
Creator of The Builder's Academy
cruelworld.dune.net 9091

#3 From: gilgamesh4d@...
Date: Tue Aug 7, 2001 3:32 pm
Subject: Hey All! (And a little question)
gilgamesh4d@...
Send Email Send Email
 
Just wanted to say "Hey All!". But as long as I'm writing a note, why
won't I ask a question?

How do I use tamporary global vars? I know how to ass flags to the
player file, but I don't need this. I need a temp flag that will tell
me If a plyer entered a room, or said a word... I could use an
example or two. I need to know:
How to make a new global var
How to change it
How to "read" it (use it with another script)

Thanks!!!

Gilg.

BTW - Sorry for bad English.

#2 From: dg_scripts@yahoogroups.com
Date: Mon Jul 9, 2001 1:19 pm
Subject: New poll for dg_scripts
dg_scripts@yahoogroups.com
Send Email Send Email
 
Enter your vote today!  A new poll has been created for the
dg_scripts group:

Is the 'new' mailing list working as
well as the old one?

   o Yes, much better
   o Haven't noticed much difference
   o No, I liked the old one better
   o I was never on the old one


To vote, please visit the following web page:

http://groups.yahoo.com/group/dg_scripts/polls

Note: Please do not reply to this message. Poll votes are
not collected via email. To vote, you must go to the Yahoo! Groups
web site listed above.

Thanks!

Messages 1 - 31 of 791   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help