it simple, copy SQL from DELIMITER to $$ and paste in Query in HEIDI SQL, and run QUERY.
But porblem is with QUERY this QUERY (trigger) can run only one when player create CHARACTER.
- Code: Select all
delimiter $$
CREATE TRIGGER `t_set_first_spawn` before INSERT ON `character` FOR EACH ROW BEGIN
set New.GeoID = 117052637;
set New.GeoAlt = 5100;
set New.BindedObjectID = 12345;
END;
$$
If You Want force spawn after DIE or pray you should use diffirent condition
- Code: Select all
delimiter $$
CREATE TRIGGER `t_set_death_spawn` BEFORE UPDATE ON `character` FOR EACH ROW BEGIN
-- option set pawn point like character binded object:
SET @spawnPoint = (SELECT BindedObjectID FROM `character` ch WHERE ch.ID = NEW.ID);
set New.RallyObjectID = @spawnPoint;
-- or to specyfic unmobable object like monument in top mountain
set New.RallyObjectID = XXX;
END
$$
where XXX is a ID from DB table UNMOVABLE_OBJECTS.