Welcome to the Builder Academy

Question Zedit Glitch I've ran into

More
19 Jul 2012 11:58 #392 by Liko
Hello,

I ran into a small little glitch with zedit when I added chance loading to objects, mobs, etc.
Code:
0 - Load Nydan Goblin Warrior [201], Max : 16, Chance : 100% 1 - <Unknown Command> 2 - <Unknown Command> 3 - <Unknown Command> 4 - <Unknown Command> 5 - <Unknown Command> 6 - <Unknown Command>

As you can see it isn't suppose to be like that. When I copyover it restores back to normal.
Code:
0 - Load Nydan Goblin Warrior [201], Max : 16, Chance : 100% 1 - Give it Goblin's Arm [201], Max : 10000, Chance : 60% 2 - Give it Goblin's Leg [202], Max : 10000, Chance : 60% 3 - Give it Goblin's Hat [204], Max : 10000, Chance : 30% 4 - Give it Goblin's Necklace [206], Max : 10000, Chance : 5% 5 - Give it Goblin's Ring [205], Max : 10000, Chance : 3% 6 - Give it Goblin's Heart [203], Max : 10000, Chance : 1%

Any ideas that would cause it to switch to unknown command all of a sudden?

Randian(0.0.0)
Owner/Developer

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

More
19 Jul 2012 12:20 #393 by Rumble
If I remember correctly the "unknown command" was used to replace an illegal zedit command. I think Welcor fixed this since some of those illegal commands would cause a crash. Search the code for "unknown command" to see how it is used, you might need to modify it slightly.

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

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

More
19 Jul 2012 13:22 #394 by Liko
Replied by Liko on topic Re: Zedit Glitch I've ran into

Rumble wrote: If I remember correctly the "unknown command" was used to replace an illegal zedit command. I think Welcor fixed this since some of those illegal commands would cause a crash. Search the code for "unknown command" to see how it is used, you might need to modify it slightly.

Code:
static void zedit_disp_menu(struct descriptor_data *d) { int subcmd = 0, room, counter = 0; char buf1[MAX_STRING_LENGTH], lev_string[50]; bool levels_set = FALSE; get_char_colors(d->character); clear_screen(d); room = real_room(OLC_NUM(d)); sprintbitarray(OLC_ZONE(d)->zone_flags, zone_bits, ZN_ARRAY_MAX, buf1); levels_set = zedit_get_levels(d, lev_string); /* Menu header */ send_to_char(d->character, "Room number: %s%d%s Room zone: %s%d\r\n" "%s1%s) Builders : %s%s\r\n" "%sZ%s) Zone name : %s%s\r\n" "%sL%s) Lifespan : %s%d minutes\r\n" "%sB%s) Bottom of zone : %s%d\r\n" "%sT%s) Top of zone : %s%d\r\n" "%sR%s) Reset Mode : %s%s\r\n" "%sF%s) Zone Flags : %s%s\r\n" "%sM%s) Level Range : %s%s%s\r\n" "[Command list]\r\n", cyn, OLC_NUM(d), nrm, cyn, zone_table[OLC_ZNUM(d)].number, grn, nrm, yel, OLC_ZONE(d)->builders ? OLC_ZONE(d)->builders : "None.", grn, nrm, yel, OLC_ZONE(d)->name ? OLC_ZONE(d)->name : "<NONE!>", grn, nrm, yel, OLC_ZONE(d)->lifespan, grn, nrm, yel, OLC_ZONE(d)->bot, grn, nrm, yel, OLC_ZONE(d)->top, grn, nrm, yel, OLC_ZONE(d)->reset_mode ? ((OLC_ZONE(d)->reset_mode == 1) ? "Reset when no players are in zone." : "Normal reset.") : "Never reset", grn, nrm, cyn, buf1, grn, nrm, levels_set ? cyn : yel, lev_string, nrm ); /* Print the commands for this room into display buffer. */ while (MYCMD.command != 'S') { /* Translate what the command means. */ write_to_output(d, "%s%d - %s", nrm, counter++, yel); switch (MYCMD.command) { case 'M': write_to_output(d, "%sLoad %s [%s%d%s], Max : %d, Chance : %d%%", MYCMD.if_flag ? " then " : "", mob_proto[MYCMD.arg1].player.short_descr, cyn, mob_index[MYCMD.arg1].vnum, yel, MYCMD.arg2, MYCMD.arg4 ); break; case 'G': write_to_output(d, "%sGive it %s [%s%d%s], Max : %d, Chance : %d%%", MYCMD.if_flag ? " then " : "", obj_proto[MYCMD.arg1].short_description, cyn, obj_index[MYCMD.arg1].vnum, yel, MYCMD.arg2, MYCMD.arg4 ); break; case 'O': write_to_output(d, "%sLoad %s [%s%d%s], Max : %d, Chance : %d%%", MYCMD.if_flag ? " then " : "", obj_proto[MYCMD.arg1].short_description, cyn, obj_index[MYCMD.arg1].vnum, yel, MYCMD.arg2, MYCMD.arg4 ); break; case 'E': write_to_output(d, "%sEquip with %s [%s%d%s], %s, Max : %d, Chance : %d%%", MYCMD.if_flag ? " then " : "", obj_proto[MYCMD.arg1].short_description, cyn, obj_index[MYCMD.arg1].vnum, yel, equipment_types[MYCMD.arg3], MYCMD.arg2, MYCMD.arg4 ); break; case 'P': write_to_output(d, "%sPut %s [%s%d%s] in %s [%s%d%s], Max : %d, Chance : %d%%", MYCMD.if_flag ? " then " : "", obj_proto[MYCMD.arg1].short_description, cyn, obj_index[MYCMD.arg1].vnum, yel, obj_proto[MYCMD.arg3].short_description, cyn, obj_index[MYCMD.arg3].vnum, yel, MYCMD.arg2, MYCMD.arg4 ); break; case 'R': write_to_output(d, "%sRemove %s [%s%d%s] from room.", MYCMD.if_flag ? " then " : "", obj_proto[MYCMD.arg2].short_description, cyn, obj_index[MYCMD.arg2].vnum, yel ); break; case 'D': write_to_output(d, "%sSet door %s as %s.", MYCMD.if_flag ? " then " : "", dirs[MYCMD.arg2], MYCMD.arg3 ? ((MYCMD.arg3 == 1) ? "closed" : "locked") : "open" ); case 'T': write_to_output(d, "%sAttach trigger %s%s%s [%s%d%s] to %s, Chance : %d%%", MYCMD.if_flag ? " then " : "", cyn, trig_index[MYCMD.arg2]->proto->name, yel, cyn, trig_index[MYCMD.arg2]->vnum, yel, ((MYCMD.arg1 == MOB_TRIGGER) ? "mobile" : ((MYCMD.arg1 == OBJ_TRIGGER) ? "object" : ((MYCMD.arg1 == WLD_TRIGGER)? "room" : "????"))), MYCMD.arg4); break; case 'V': write_to_output(d, "%sAssign global %s:%d to %s = %s, Chance : %d%%", MYCMD.if_flag ? " then " : "", MYCMD.sarg1, MYCMD.arg2, ((MYCMD.arg1 == MOB_TRIGGER) ? "mobile" : ((MYCMD.arg1 == OBJ_TRIGGER) ? "object" : ((MYCMD.arg1 == WLD_TRIGGER)? "room" : "????"))), MYCMD.sarg2, MYCMD.arg4); break; default: write_to_output(d, "<Unknown Command>"); break; } write_to_output(d, "\r\n"); subcmd++; } /* Finish off menu */ write_to_output(d, "%s%d - <END OF LIST>\r\n" "%sN%s) Insert new command.\r\n" "%sE%s) Edit a command.\r\n" "%sD%s) Delete a command.\r\n" "%sQ%s) Quit\r\nEnter your choice : ", nrm, counter, grn, nrm, grn, nrm, grn, nrm, grn, nrm ); OLC_MODE(d) = ZEDIT_MAIN_MENU; }

I was checking the logs and its not actually causing any errors its just displaying 'unknown command'. I am wondering if it's not just a display error. The command that would be in question would be 'g' since its giving the NPC a object.

Randian(0.0.0)
Owner/Developer

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

More
19 Jul 2012 13:51 #395 by rudeboyrave
make sure you are loading the mobile into the room first!

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
19 Jul 2012 14:31 - 19 Jul 2012 14:32 #396 by Liko
Replied by Liko on topic Re: Zedit Glitch I've ran into

rudeboyrave wrote: make sure you are loading the mobile into the room first!


That is the issue.

How I would I go about loading multiple items into his inventory, but not being based on the previous item being loaded.

Exmaple

Mob A loads at 100%
Item a loads into his inventory at 50%
item b loads into his inventory at 10%

Randian(0.0.0)
Owner/Developer
Last edit: 19 Jul 2012 14:32 by Liko.

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

More
19 Jul 2012 20:26 #402 by Halenbane
This is an issue that I have seen.

You load mob "Bob" into room.
Then you load a sword to him at 50% which is dependent on him loading in the first place.
(Otherwise if Bob isn't 100% load, then you will get an error if the item tries to load)

The problem with this, is when you go to load another item to him, lets say a shield.
If the shield is also dependent, it reads the dependency from the previous item load
instead of Bob loading.

The only way to work around this currently is to not make the object loads dependent, but
then again, if Bob's load isn't 100%, then when the mud tries to load the item (if not dependent)
you will have issues.

Hope this makes sense. Anyone have input on this?

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

Time to create page: 0.270 seconds