Most people make custom portals by modifying an existing portal spell’s coordinates in the spell_target_position. I have seen one example of someone using event_scripts for the portal, but since those are deprecated perhaps it’s time someone posts a SAI version.
Here’s the sql (obviously, replace all instances of xxx with whatever value you want there):
[CODE]SET @entry := xxx; – Game object entry
SET @text := ‘xxx’; – Tooltip to show when hoving over portal
SET @display := 1327; – Display id to use for the portal
– Coordinates to port to:
SET @map := xxx; – Map id
SET @x := xxx;
SET @y := xxx;
SET @z := xxx;
SET @o := xxx; – Orientation in radians, 0 is north
INSERT INTO gameobject_template
VALUES (@entry,10,@display,@text,‘’,‘’,‘’,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,‘SmartGameObjectAI’,‘’,1);
INSERT INTO smart_scripts
VALUES (@entry,1,0,0,64,0,100,0,0,0,0,0,62,@map,0,0,0,0,0,0,0,0,0,@x,@y,@z,@o,CONCAT(@text, ’ - On click - Teleport’));[/CODE]
For example, a portal to shatterspear village:
[CODE]SET @entry := 500001; – Game object entry
SET @text := ‘Portal to Shatterspear Village’; – Tooltip to show when hoving over portal
SET @display := 1327; – Display id to use for the portal
– Coordinates to port to:
SET @map := 1; – Map id
SET @x := 7367.77;
SET @y := -1560.74;
SET @z := 163.45;
SET @o := 2.55; – Orientation in radians, 0 is north
INSERT INTO gameobject_template
VALUES (@entry,10,@display,@text,‘’,‘’,‘’,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,‘SmartGameObjectAI’,‘’,1);
INSERT INTO smart_scripts
VALUES (@entry,1,0,0,64,0,100,0,0,0,0,0,62,@map,0,0,0,0,0,0,0,0,0,@x,@y,@z,@o,CONCAT(@text, ’ - On click - Teleport’));[/CODE]