Welcome to the Builder Academy

Question Dracmas annoying thread of questions

More
27 Dec 2014 03:04 #5190 by krell

dracmas wrote: Kinda feel like a dunce for missing the stats option in medit. Odd.

I know you had to be thinking "what an idiot". I'm thinking that now too.


Actually, I was thinking, "RTFM!"

Honestly, don't be so hard on yourself. We've all been there, we'll end up there again at some point. Just learn from the experience and move on, don't beat yourself up. :-)

Please Log in or Create an account to join the conversation.

More
28 Dec 2014 15:10 #5191 by dracmas
I've been looking to try to make the welcome dgscript global. "enters the realm" etc
Do I have to attach the script to every area, or is there something I can do to make it global? Also %zonecho% is only for that zone, so didn't see one that echos everywhere.

Please Log in or Create an account to join the conversation.

More
28 Dec 2014 15:10 - 28 Dec 2014 15:19 #5192 by dracmas
trig 3017

edit so I don't use another post: Just looking for a hint, point in the right direction as it were :) I don't know how trigs can or if they can operate globally at all.
Last edit: 28 Dec 2014 15:19 by dracmas. Reason: clarification

Please Log in or Create an account to join the conversation.

More
28 Dec 2014 16:05 #5193 by Rumble
There is no game echo trigedit variable. This was intentional since it could get very spammy if abused and should probably be added to the code not via trigedit if it is game-wide. You can add a game echo in the code, add a trigedit game echo option, or have a mob gossip or shout the greeting like trig 127.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

More
28 Dec 2014 17:55 - 28 Dec 2014 18:33 #5195 by dracmas
gotcha. I ended up doing a send_to_all.
I want everyone to know when someone logs in, so
no ACT() needed for this.

In interpreter.c: + means add this in.
Code:
void nanny(struct descriptor_data *d, char *arg) { int load_result; /* Overloaded variable */ int player_i; + char greetingbuf[MAX_STRING_LENGTH]; /* for login greeting showing players */

next
Code:
greet_mtrigger(d->character, -1); greet_memory_mtrigger(d->character); + sprintf (greetingbuf, "%s has logged in.\r\n", GET_NAME(d->character)); + send_to_all(greetingbuf); act("$n has entered the game.", TRUE, d->character, 0, 0, TO_ROOM);

For quitting the game, in act.other.c:
Code:
ACMD(do_quit) { + char goodbyebuf[MAX_STRING_LENGTH]; /* for quit farewell showing players */ if (IS_NPC(ch) || !ch->desc) return; if (subcmd != SCMD_QUIT && GET_LEVEL(ch) < LVL_IMMORT) send_to_char(ch, "You have to type quit--no less, to quit!\r\n"); else if (GET_POS(ch) == POS_FIGHTING) send_to_char(ch, "No way! You're fighting for your life!\r\n"); else if (GET_POS(ch) < POS_STUNNED) { send_to_char(ch, "You die before your time...\r\n"); die(ch, NULL); } else { act("$n has left the game.", TRUE, ch, 0, 0, TO_ROOM); + sprintf (goodbyebuf, "%s has logged off.\r\n", GET_NAME(ch)); + send_to_all(goodbyebuf); mudlog(NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE, "%s has quit the game.", GET_NAME(ch)); if (GET_QUEST_TIME(ch) != -1) quest_timeout(ch); send_to_char(ch, "Goodbye, friend.. Come back soon!\r\n");

I placed the text around where I added so it can be searched by an editor to locate it.
Last edit: 28 Dec 2014 18:33 by dracmas. Reason: Added logout in as well.

Please Log in or Create an account to join the conversation.

More
29 Dec 2014 01:24 - 29 Dec 2014 03:41 #5196 by dracmas
This time around I'm working on a mob script for a mudschool guard. It works, only thing is that it isn't right if the player leaves before the script is done. Is there a way I can null the players command until he's "kissed pavement lol" in the room below? Just so the player doesnt do anything until its over.
Code:
if %direction% == north if %actor.level% > 5 return 0 %send% %actor% The guard humiliates you, and blocks your way. %echoaround% %actor% The guard humiliates %actor.name%, and blocks %actor.hisher% way. wait 2 sec %send% %actor% The guard balls up his fist. %echoaround% %actor% The guard balls up his fist. wait 2 sec %send% %actor% The guard punches you, sending you flying down the stairs! %echoaround% %actor% The guard punches %actor.name%, sending %actor.name% flying down the stairs! wait 2 sec %teleport% %actor% 3001 wait 2 sec %send% %actor% The ground is coming closer rather fast. %echoaround% %actor% You see %actor.name% get thrown out of Mudschool. Yikes! wait 2 sec %send% %actor% You hit the ground with a BOOM! %echoaround% %actor% %actor.name% has arived from above, head first into the pavement. end end

Edit: another idea is if it's possible to enable a triger with a trigger.
something like this. First script enables second script at the start of it. Then disables it at the end. Second script being like the one below but stops all commands.
Code:
Trigger Intended Assignment: Rooms Trigger Type: Cast , Numeric Arg: 100, Arg list: None Commands: * By Rumble of The Builder Academy tbamud.com 9091 * Prevent spell casting in this room. * %echo% %actor.name% tried to cast spellnumber: %spell%: %spellname% on %vict.name% %obj.name%. %send% %actor% Your magic fizzles out and dies. %echoaround% %actor% %actor.name%'s magic fizzles out and dies. return 0
but not using any commands instead.
Last edit: 29 Dec 2014 03:41 by dracmas. Reason: Another idea

Please Log in or Create an account to join the conversation.

Time to create page: 0.244 seconds