blackdragonsdg
07-14-2010, 09:58 PM
Zone lines are fun...if the data for the zone line already appears in the zone_points table in the db you can modify parts of it like target_zone_id, target_z, target_y, target_x but you can not modify the actual location of the zone line(x,y,z).
Example:
***Dragonscale Hills -> Crystallos***
REPLACE into zone_points(`zone`, `number`, `y`, `x`, `z`, `heading`, `target_y`, `target_x`, `target_z`, `target_heading`, `zoneinst`, `target_zone_id`, `buffer`) VALUES('dragonscale', 200, 0, 0, 0, 0, -64, -60, -78, 0, 0, 446, 0);
***Dragonscale Hills -> Dragonscale Hills***
update zone_points set target_x = 1689, target_y = 1425, target_z = 212, target_heading = 222, target_zone_id = 442 where target_zone_id = 446 and zone = 'dragonscale';
The Dragonscale Hills -> Dragonscale Hills update causes you to zone back to the center of Dragonscale Hills when you attempt to zone to Crystallos.
The only way I am aware of that can circumvent the zone lines is by quest trigger. The following will add invisible npc's to the bazaar which makes the portals for the red and blue sections function properly.
/* BazaarRed_Up */
delete from spawnentry where spawngroupID = 75160;
delete from spawngroup where id = 75160;
delete from spawn2 where id = 750160;
delete from npc_types where id = 750160;
INSERT INTO `spawnentry` (`spawngroupID`, `npcID`, `chance`) VALUES (75160, 750160, 100);
INSERT INTO `spawngroup` (`id`, `name`, `spawn_limit`, `dist`, `max_x`, `min_x`, `max_y`, `min_y`, `delay`) VALUES (75160, '75160', 1, 0, 0, 0, 0, 0, 0);
INSERT INTO `spawn2` (`id`, `spawngroupID`, `zone`, `version`, `x`, `y`, `z`, `heading`, `respawntime`, `variance`, `pathgrid`, `_condition`, `cond_value`) VALUES (750160, 75160, 'bazaar', 0, -53.6, 302.5, 35.3, 20.1, 0, 0, 0, 0, 1);
INSERT INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `gender`, `texture`, `helmtexture`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `npc_spells_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `npcspecialattks`, `aggroradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`, `drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `d_meele_texture1`, `d_meele_texture2`, `runspeed`, MR, CR, DR, FR, PR, `see_invis`, `see_invis_undead`, `qglobal`, AC, `npc_aggro`, `spawn_limit`, `attack_speed`, `findable`, STR, STA, DEX, AGI, _INT, WIS, CHA, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, ATK, `Accuracy`, `slow_mitigation`, `version`, `maxlevel`, `scalerate`) VALUES (750160, 'BazaarRed_Up', '(Zone NPC)', 85, 127, 1, 67, 120000, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 4000, 5000, 'ABH', 100, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 4, 0, 0, -75, 0, 500, 500, 500, 500, 500, 500, 500, 1, 1, 0, 0, 1, 8000, 75, 0, 0, 0, 100);
/* BazaarRed_Down */
delete from spawnentry where spawngroupID = 75161;
delete from spawngroup where id = 75161;
delete from spawn2 where id = 750161;
delete from npc_types where id = 750161;
INSERT INTO `spawnentry` (`spawngroupID`, `npcID`, `chance`) VALUES (75161, 750161, 100);
INSERT INTO `spawngroup` (`id`, `name`, `spawn_limit`, `dist`, `max_x`, `min_x`, `max_y`, `min_y`, `delay`) VALUES (75161, '75161', 1, 0, 0, 0, 0, 0, 0);
INSERT INTO `spawn2` (`id`, `spawngroupID`, `zone`, `version`, `x`, `y`, `z`, `heading`, `respawntime`, `variance`, `pathgrid`, `_condition`, `cond_value`) VALUES (750161, 75161, 'bazaar', 0, -887.6, 1162.4, 2.9, 1.1, 0, 0, 0, 0, 1);
INSERT INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `gender`, `texture`, `helmtexture`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `npc_spells_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `npcspecialattks`, `aggroradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`, `drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `d_meele_texture1`, `d_meele_texture2`, `runspeed`, MR, CR, DR, FR, PR, `see_invis`, `see_invis_undead`, `qglobal`, AC, `npc_aggro`, `spawn_limit`, `attack_speed`, `findable`, STR, STA, DEX, AGI, _INT, WIS, CHA, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, ATK, `Accuracy`, `slow_mitigation`, `version`, `maxlevel`, `scalerate`) VALUES (750161, 'BazaarRed_Down', '(Zone NPC)', 85, 127, 1, 67, 120000, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 4000, 5000, 'ABH', 100, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 4, 0, 0, -75, 0, 500, 500, 500, 500, 500, 500, 500, 1, 1, 0, 0, 1, 8000, 75, 0, 0, 0, 100);
/* BazaarBlue_Up */
delete from spawnentry where spawngroupID = 75162;
delete from spawngroup where id = 75162;
delete from spawn2 where id = 750162;
delete from npc_types where id = 750162;
INSERT INTO `spawnentry` (`spawngroupID`, `npcID`, `chance`) VALUES (75162, 750162, 100);
INSERT INTO `spawngroup` (`id`, `name`, `spawn_limit`, `dist`, `max_x`, `min_x`, `max_y`, `min_y`, `delay`) VALUES (75162, '75162', 1, 0, 0, 0, 0, 0, 0);
INSERT INTO `spawn2` (`id`, `spawngroupID`, `zone`, `version`, `x`, `y`, `z`, `heading`, `respawntime`, `variance`, `pathgrid`, `_condition`, `cond_value`) VALUES (750162, 75162, 'bazaar', 0, 302.8, 49.7, 35.4, 223.9, 0, 0, 0, 0, 1);
INSERT INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `gender`, `texture`, `helmtexture`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `npc_spells_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `npcspecialattks`, `aggroradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`, `drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `d_meele_texture1`, `d_meele_texture2`, `runspeed`, MR, CR, DR, FR, PR, `see_invis`, `see_invis_undead`, `qglobal`, AC, `npc_aggro`, `spawn_limit`, `attack_speed`, `findable`, STR, STA, DEX, AGI, _INT, WIS, CHA, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, ATK, `Accuracy`, `slow_mitigation`, `version`, `maxlevel`, `scalerate`) VALUES (750162, 'BazaarBlue_Up', '(Zone NPC)', 85, 127, 1, 67, 120000, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 4000, 5000, 'ABH', 100, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 4, 0, 0, -75, 0, 500, 500, 500, 500, 500, 500, 500, 1, 1, 0, 0, 1, 8000, 75, 0, 0, 0, 100);
/* BazaarBlue_Down */
delete from spawnentry where spawngroupID = 75163;
delete from spawngroup where id = 75163;
delete from spawn2 where id = 750163;
delete from npc_types where id = 750163;
INSERT INTO `spawnentry` (`spawngroupID`, `npcID`, `chance`) VALUES (75163, 750163, 100);
INSERT INTO `spawngroup` (`id`, `name`, `spawn_limit`, `dist`, `max_x`, `min_x`, `max_y`, `min_y`, `delay`) VALUES (75163, '75163', 1, 0, 0, 0, 0, 0, 0);
INSERT INTO `spawn2` (`id`, `spawngroupID`, `zone`, `version`, `x`, `y`, `z`, `heading`, `respawntime`, `variance`, `pathgrid`, `_condition`, `cond_value`) VALUES (750163, 75163, 'bazaar', 0, 924.1, 1163.6, 2.9, 255.9, 0, 0, 0, 0, 1);
INSERT INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `gender`, `texture`, `helmtexture`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `npc_spells_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `npcspecialattks`, `aggroradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`, `drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `d_meele_texture1`, `d_meele_texture2`, `runspeed`, MR, CR, DR, FR, PR, `see_invis`, `see_invis_undead`, `qglobal`, AC, `npc_aggro`, `spawn_limit`, `attack_speed`, `findable`, STR, STA, DEX, AGI, _INT, WIS, CHA, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, ATK, `Accuracy`, `slow_mitigation`, `version`, `maxlevel`, `scalerate`) VALUES (750163, 'BazaarBlue_Down', '(Zone NPC)', 85, 127, 1, 67, 120000, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 4000, 5000, 'ABH', 100, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 4, 0, 0, -75, 0, 500, 500, 500, 500, 500, 500, 500, 1, 1, 0, 0, 1, 8000, 75, 0, 0, 0, 100);
These must be accompanied by quest scripts in the bazaar quest folder of the emulator.
BazaarBlue_Down.pl
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 15, $x + 15, $y - 15, $y + 15);
}
sub EVENT_ENTER
{
quest::movepc(151,255,32,33);
}
#END of FILE Zone:bazaar teleporter
BazaarBlue_Up.pl
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 15, $x + 15, $y - 15, $y + 15);
}
sub EVENT_ENTER
{
quest::movepc(151,921,1213,2);
}
#END of FILE Zone:bazaar teleporter
BazaarRed_Down.pl
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 15, $x + 15, $y - 15, $y + 15);
}
sub EVENT_ENTER
{
quest::movepc(151,-22,258,33);
}
#END of FILE Zone:bazaar teleporter
BazaarRed_Up.pl
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 15, $x + 15, $y - 15, $y + 15);
}
sub EVENT_ENTER
{
quest::movepc(151,-891,1212,2);
}
#END of FILE Zone:bazaar teleporter
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.