Add a new location to the Teleporter

Go down

Add a new location to the Teleporter

Post by alekzan on Wed Jan 01, 2014 5:17 am

Hi, 


I just added Portal Master, now I'm trying to add a new location to the menu, but I have several problem.


I don't understand how to add the line in "Smart_Scripts".


For Darnassus should be something like this:

Code:
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, 7, 0, 62, 0, 100, 0, @GOSSIP_MENU, 3, 0, 0, 62, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 9869.91, 2493.58, 1315.88, 2.78897, "Teleporter script");


But I can't figure out what I have to change, excluding the coordinates, for a new location (I already added the line in "Gossip_menu_option")....Maybe, can you help me? (I'm using Trinity Core)


(sorry if I misspelled something  Rolling Eyes )

alekzan

Viestien lukumäärä : 1
Join date : 2014-01-01

Back to top Go down

Re: Add a new location to the Teleporter

Post by Hyldran0 on Mon Jan 27, 2014 10:49 am

I need help with this too..

I post here instead of making a new thread!


I wanna add 2 more teleports to the teleporter.
1 that will teleport ONLY alliance and 1 that will ONLY teleport horde.

It would be nice if you'd can give us the sql to do it Smile

Thanks in advance

Regards
Hyldran0

Hyldran0

Viestien lukumäärä : 6
Join date : 2011-11-21

Back to top Go down

Re: Add a new location to the Teleporter

Post by Rochet2 on Fri Jan 31, 2014 1:39 am

Lets see..

Code:
SET
@NPC_ENTRY := 190000, -- teleporter entry

@MENU_ID := 50000, -- the menu's id, see gossip_menu_option.menu_id
@ID := 1, -- position in menu where you want the option to be in, see gossip_menu_option.id
@ICON := 2,
@TELE_NAME := "Custom Location",
@POPUP := "Are you sure?",

@COST := 0, -- copper
@REQ_LEVEL := 0, -- 0 for no requirement
@FACTION := 0, -- 0 for no req. 469 - Alliance, 67 - Horde.

@MAP := 0,
@X := 0.0,
@Y := 0.0,
@Z := 0.0,
@O := 0.0;

UPDATE `gossip_menu_option` SET `id` = `id`+1 WHERE `menu_id` = @MENU_ID AND `id` >= @ID ORDER BY `id` DESC;
UPDATE `conditions` SET `SourceEntry` = `SourceEntry`+1 WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = @MENU_ID AND `SourceEntry` >= @ID ORDER BY `SourceEntry` DESC;
UPDATE `smart_scripts` SET `event_param2` = `event_param2`+1 WHERE `entryorguid` = @NPC_ENTRY AND `source_type` = 0 AND `event_param1` = @MENU_ID AND `event_param2` >= @ID ORDER BY `event_param2` DESC;

INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `box_money`, `box_text`) VALUES
(@MENU_ID, @ID, @ICON, @TELE_NAME, 1, 1, @MENU_ID, @COST, @POPUP);

INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `Comment`) VALUES
(15, @MENU_ID, @ID, 27, @REQ_LEVEL, 3, 0, CONCAT("Portal Master Level req - ", @TELE_NAME));
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `Comment`) VALUES
(15, @MENU_ID, @ID, 6, @FACTION, 0, 0, CONCAT("Portal Master Fact req - ", @TELE_NAME));

SET @SID := (SELECT `id` FROM `smart_scripts` WHERE `entryorguid` = @NPC_ENTRY AND `source_type` = 0 ORDER BY `id` DESC LIMIT 1)+1;
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
(@NPC_ENTRY, 0, IFNULL(@SID, 1), 0, 62, 0, 100, 0, @MENU_ID, @ID, 0, 0, 62, @MAP, 0, 0, 0, 0, 0, 7, 0, 0, 0, @X, @Y, @Z, @O, CONCAT("Teleporter script - ", @TELE_NAME));
avatar
Rochet2
Admin

Viestien lukumäärä : 196
Join date : 2010-02-04

http://emuproject.bbflash.net

Back to top Go down

Re: Add a new location to the Teleporter

Post by Hyldran0 on Fri Jan 31, 2014 5:33 am

Thanks alot man! Very Happy

You are awesome Smile

Regards
Hyldran0

Hyldran0

Viestien lukumäärä : 6
Join date : 2011-11-21

Back to top Go down

Re: Add a new location to the Teleporter

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum