Como eu crio npc teleporte gostaria de fazer npc para teleporta para uma area que criei ?
Código:
/*
TrinityCore Portal Master
By Rochet2
Downloaded from http://rochet2.github.io/
Bugs and contact with E-mail: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
*/
SET
@ENTRY := 190001,
@NAME := "Portal Master",
@SUBNAME := "",
@MODEL := 21572,
@AURA := "30540", -- "35766" = casting
@GOSSIP_MENU := 50000;
-- Deleting code
DELETE FROM creature_template WHERE entry = @ENTRY;
DELETE FROM creature_template_addon WHERE Entry = @ENTRY ;
DELETE FROM gossip_menu_option WHERE menu_id BETWEEN @GOSSIP_MENU AND @GOSSIP_MENU+8;
DELETE FROM smart_scripts WHERE entryorguid = @ENTRY AND source_type = 0;
DELETE from creature WHERE ID = @ENTRY;
-- Teleporter
INSERT INTO creature_template (entry, modelid1, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, faction, npcflag, speed_walk, speed_run, scale, rank, unit_class, unit_flags, type, type_flags, InhabitType, RegenHealth, flags_extra, AiName) VALUES
(@ENTRY, @MODEL, @NAME, @SUBNAME, "Directions", @GOSSIP_MENU, 71, 71, 35, 3, 1, 1.14286, 1.25, 1, 1, 2, 7, 138936390, 3, 1, 2, "SmartAI");
-- Teleporter aura
INSERT INTO creature_template_addon (entry, mount, bytes1, bytes2, emote, path_id, auras) VALUES (@ENTRY, 0, 0, 0, 0, 0, @AURA);
-- Gossip options:
INSERT INTO gossip_menu_option (menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, action_menu_id, action_poi_id, box_coded, box_money, box_text) VALUES
(@GOSSIP_MENU, 1, 2, "Ventobravo", 1, 1, @GOSSIP_MENU, 0, 0, 0, "Tem certeza de que deseja ir para Ventobravo?");
-- Teleport scripts:
INSERT INTO smart_scripts (entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_x, target_y, target_z, target_o, comment) VALUES
(@ENTRY, 0, 1, 0, 62, 0, 100, 0, @GOSSIP_MENU, 1, 0, 0, 62, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, -8842.09, 626.358, 94.0867, 3.61363, "Teleporter script");
/*
TrinityCore Portal Master
By Rochet2
Downloaded from http://rochet2.github.io/
Bugs and contact with E-mail: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
*/
Código:
/*
TrinityCore Portal Master
By Rochet2
Downloaded from http://rochet2.github.io/
Bugs and contact with E-mail: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
*/
SET
@ENTRY := 190001,
@NAME := "Portal Master",
@SUBNAME := "",
@MODEL := 21572,
@AURA := "30540", -- "35766" = casting
@GOSSIP_MENU := 50000;
-- Deleting code
DELETE FROM creature_template WHERE entry = @ENTRY;
DELETE FROM creature_template_addon WHERE Entry = @ENTRY ;
DELETE FROM gossip_menu_option WHERE menu_id BETWEEN @GOSSIP_MENU AND @GOSSIP_MENU+8;
DELETE FROM smart_scripts WHERE entryorguid = @ENTRY AND source_type = 0;
DELETE from creature WHERE ID = @ENTRY;
-- Teleporter
INSERT INTO creature_template (entry, modelid1, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, faction, npcflag, speed_walk, speed_run, scale, rank, unit_class, unit_flags, type, type_flags, InhabitType, RegenHealth, flags_extra, AiName) VALUES
(@ENTRY, @MODEL, @NAME, @SUBNAME, "Directions", @GOSSIP_MENU, 71, 71, 35, 3, 1, 1.14286, 1.25, 1, 1, 2, 7, 138936390, 3, 1, 2, "SmartAI");
-- Teleporter aura
INSERT INTO creature_template_addon (entry, mount, bytes1, bytes2, emote, path_id, auras) VALUES (@ENTRY, 0, 0, 0, 0, 0, @AURA);
-- Gossip options:
INSERT INTO gossip_menu_option (menu_id, id, option_icon, option_text, option_id, npc_option_npcflag, action_menu_id, action_poi_id, box_coded, box_money, box_text) VALUES
(@GOSSIP_MENU, 1, 2, "Ventobravo", 1, 1, @GOSSIP_MENU, 0, 0, 0, "Tem certeza de que deseja ir para Ventobravo?"),
(@GOSSIP_MENU, 2, 2, "Orgrimmar", 1, 1, @GOSSIP_MENU, 0, 0, 0, "Tem certeza de que deseja ir para Orgrimmar?"),
(@GOSSIP_MENU, 3, 2, "Darnassus", 1, 1, @GOSSIP_MENU, 0, 0, 0, "Tem certeza de que deseja ir para Darnassus?"),
(@GOSSIP_MENU, 4, 2, "Altaforja", 1, 1, @GOSSIP_MENU, 0, 0, 0, "Tem certeza de que deseja ir para Altaforja?"),
(@GOSSIP_MENU, 5, 2, "Exodar", 1, 1, @GOSSIP_MENU, 0, 0, 0, "Tem certeza de que deseja ir para Exodar?"),
(@GOSSIP_MENU, 6, 2, "Penhasco do Trovão", 1, 1, @GOSSIP_MENU, 0, 0, 0, "Tem certeza de que deseja ir para o Penhasco do Trovão?");
-- Teleport scripts:
INSERT INTO smart_scripts (entryorguid, source_type, id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_x, target_y, target_z, target_o, comment) VALUES
(@ENTRY, 0, 1, 0, 62, 0, 100, 0, @GOSSIP_MENU, 1, 0, 0, 62, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, -8842.09, 626.358, 94.0867, 3.61363, "Teleporter script"),
(@ENTRY, 0, 2, 0, 62, 0, 100, 0, @GOSSIP_MENU, 2, 0, 0, 62, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 1601.08, -4378.69, 9.9846, 2.14362, "Teleporter script"),
(@ENTRY, 0, 3, 0, 62, 0, 100, 0, @GOSSIP_MENU, 11, 0, 0, 62, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, -14281.9, 552.564, 8.90422, 0.860144, "Teleporter script"),
(@ENTRY, 0, 4, 0, 62, 0, 100, 0, @GOSSIP_MENU, 10, 0, 0, 62, 530, 0, 0, 0, 0, 0, 7, 0, 0, 0, -1887.62, 5359.09, -12.4279, 4.40435, "Teleporter script"),
(@ENTRY, 0, 5, 0, 62, 0, 100, 0, @GOSSIP_MENU, 9, 0, 0, 62, 571, 0, 0, 0, 0, 0, 7, 0, 0, 0, 5809.55, 503.975, 657.526, 2.38338, "Teleporter script"),
(@ENTRY, 0, 6, 0, 62, 0, 100, 0, @GOSSIP_MENU, 12, 0, 0, 62, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, -13181.8, 339.356, 42.9805, 1.18013, "Teleporter script");
/*
TrinityCore Portal Master
By Rochet2
Downloaded from http://rochet2.github.io/
Bugs and contact with E-mail: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
*/