Please check out Realm of Shadows !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. DG Scripting Question Tue May 27, 2003 [6:43 PM]
Hellborn
hellborn_revenge@hotmail.com
member since: Jun 14, 2002
Reply
I have part of a zone, room numbers 9273 to 9292, and every 10 seconds the script %teleport% %random.char% to one of those rooms within that range. I've been using the Builder's Academy webpage on DG Scripts (http://dgscripts.n3.net/) but the trigger doesn't work right, and I can't derive how to

1) count the number of people in the room without actually specifying the room vnum (i < people.self;)
2) randomize the room vnum because BA's guide says that %random.#% only works for 1 up to # (%random.9273-9292%)

Here's what I've got so far:

while (people.self != 0)
for (int i = 0; i < people.self; i++) {
%teleport% %random.char% %random.9273-9292%
wait 10
}

Fixes and debugging would be much appreciated.
Solaria Evershine
admin@thesongeternal.com


2. RE: DG Scripting Question Wed May 28, 2003 [5:56 AM]
Adelai
floweryprose@hotmail.com
member since: May 10, 2002
In Reply To
Reply
I'm not sure what you're trying to do. Should this trigger teleport all the people in room A to some random room between 9273 and 9292? Or does it randomly take all the people from one room in that range and transport them to another in that range?


3. RE: DG Scripting Question Wed May 28, 2003 [12:26 PM]
Hellborn
hellborn_revenge@hotmail.com
member since: Jun 14, 2002
In Reply To
Reply
The trigger should teleport ONE character or mob in the room that it's assigned to to a random room between 9273 and 9272, wait ten seconds, then teleport another character or mob to another random room between that range. They don't necessarily have to (and I don't want them to) teleport to a static hard-coded room. I'd like to be able to attach this trigger to each room in the range, without having to hard code anything for each room.
Solaria Evershine
admin@thesongeternal.com


4. RE: DG Scripting Question Thu May 29, 2003 [3:12 AM]
scandum
Email not supplied
member since: Aug 30, 2002
In Reply To
Reply
You been number 10 or something who been asking about this script language. My best guess is that it doesn't work, and no one could care less if it does or not.
http://tintin.sf.net - Kickin It Old Skool since 1992


5. RE: DG Scripting Question Thu May 29, 2003 [7:02 AM]
Adelai
floweryprose@hotmail.com
member since: May 10, 2002
In Reply To
Reply
Actually, I use it pretty regularly, like it and have found it to be very versatile. I'll see what I can come up with.


6. RE: DG Scripting Question Thu May 29, 2003 [10:00 AM]
Adelai
floweryprose@hotmail.com
member since: May 10, 2002
In Reply To
Reply
I'm not sure how to make something exactly like you're describing, but something that might be a close approximation would be setting an entrance trigger on all the rooms with a mid-to-low percent chance of firing. If you don't specify direction or PC/NCP it should trigger occasionally when a person enters a new room.

I'm sure there's a way to target a random person, just not sure what. I'd suggest starting with the

switch %random.*%

where * is the number of rooms minus one. Then go through and do it like a random trigger, with each case sending the person to a different room and the default targeting the final room.

But its just a suggestion.


7. RE: DG Scripting Question Thu May 29, 2003 [10:25 PM]
Hellborn
hellborn_revenge@hotmail.com
member since: Jun 14, 2002
In Reply To
Reply
I've got it, thank you for your suggestion, Adelai.

wait 50
eval room %random.20%
eval pickchar %random.char%
switch %room%
  case 1
    %teleport% pickchar 9279
    %send% pickchar Oh, no!  The shifting colors of the rainbow drop you to another color's level!
    %force% pickchar look
    break
  etc...
Solaria Evershine
admin@thesongeternal.com


8. RE: DG Scripting Question Thu May 29, 2003 [10:40 PM]
Hellborn
hellborn_revenge@hotmail.com
member since: Jun 14, 2002
In Reply To
Reply
Well, that didn't quite work right, but it did do the majority of what I wanted it to do. Thanks :)
Solaria Evershine
admin@thesongeternal.com


9. RE: DG Scripting Question Tue Jun 3, 2003 [5:56 AM]
Adelai
floweryprose@hotmail.com
member since: May 10, 2002
In Reply To
Reply
Glad to hear its closer :-)

(Comment added by Adelai on Tue Jun 3 7:59:19 2003)

And I just picked part of your post to get a trigger I've been puzzling out for a week. *ducks*


10. RE: DG Scripting Question Thu Jul 10, 2003 [12:59 PM]
welcor
Email not supplied
member since: Mar 9, 2000
In Reply To
Reply
wait 50
eval room %random.20%
eval pickchar %random.char%
switch %room%  
  case 1    
    %teleport% pickchar 9279    
    %send% pickchar Oh, no!  The shifting colors of the rainbow drop you to another color's level!
    %force% pickchar look    break  etc...


Or, you could try to do it this way:

wait 50
eval char %random.char%
eval room 9272+%random.19%
%echoaround% %char% %char.name% just disappeared.
%teleport% %char% %room%
%send% %char% Oh, no!  The shifting colors of the rainbow drop you to another color's level!
%echoaround% %char% %char.name% just arrived out of nowhere.


Welcor




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]