ArcEmu: Gameobjects Teleporting Players - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Gameobjects Teleporting Players

#1 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 08 December 2010 - 09:31 AM

This topic is a result of the patch posted at http://arcemu.org/fo...showtopic=21552 . Please read the whole thread before posting anything here, thank you.

Instead of scripting the OnActivate() event of GameObjects which should teleport the Player, ArcEmu now works more blizzlike, casting the spell in the unknown1 column of gameobject_names tables if the GO type is 10 (Goober) and casting the spell in the spellfocus column of the same table if the GO type is 22 (Spellfocus). Most of these spells have as first effect SPELL_EFFECT_SCRIPT_EFFECT 77. 45 of these
SELECT id, NAME, Effect_1, Effect_2 FROM dbc_spell WHERE Effect_1 = 77 AND (NAME LIKE "%Translocate%" OR NAME LIKE "%Portal to%" OR NAME LIKE "%Portal Effect%" OR NAME LIKE "%Teleport%") AND EffectBasePoints_1 = 0;

can be easily scripted with something like
TeleportCoords *TC = ::TeleportCoordStorage.LookupEntry( spellId );
if( TC == NULL )
{
	sLog.outError("Spell %u ( %s ) has a TELEPORT TO COORDINATES effect, but has no coordinates to teleport to. ", spellId, m_spellInfo->Name );
	return;
}
HandleTeleport( TC->x, TC->y, TC->z, TC->mapId, m_caster );
return;

but 15 of them triggers a spell, specified in EffectBasePoints[0]
SELECT id, NAME, Effect_1, Effect_2, EffectBasePoints_1 FROM dbc_spell WHERE Effect_1 = 77 AND (NAME LIKE "%Translocate%" OR NAME LIKE "%Portal to%" OR NAME LIKE "%Portal Effect%" OR NAME LIKE "%Teleport%") AND EffectBasePoints_1 != 0;


I can deal with the "handle all these 60 spells, calling the right script effect" part but it would be nice if the World Database teams would find the right coordinates (and maybe post them here, too).

Removing the old OnActivate() scripts, I found these results:
SELECT entry, TYPE, spellfocus, unknown1 FROM gameobject_names WHERE entry = 187056 OR entry = 184503 OR entry = 184502 OR entry = 184500 OR entry = 184501 OR entry = 182543 OR entry = 182548 OR entry = 180912 OR entry = 180911 OR entry = 182546 OR entry = 182547 OR entry = 187428 OR entry = 187431 OR entry = 188173;

There are different values between NCDB and WhyDB. Most of NCDB entries have type 22, most of WhyDB entries have type 10. No idea which is the right one. About the WhyDB ones:
GameObject 180911 casts unexistant spell ID 34448 coords 530, 9291.155f, -7913.556f, 176.130f, 4.724170f
GameObject 180912 casts unexistant spell ID 34452 coords 530, 9291.155f, -7913.556f, 176.130f, 4.724170f
GameObject 182543 casts spell ID 25140 coords 530, -2260.6f, 3186.5f, 23.6f, 4.724170f
GameObject 182546 casts spell ID 29129 coords 530, -2260, 3223.16f, 5.534f, 1.60f
GameObject 182547 casts spell ID 29128 coords 530, -2263, 3111.45f, 136.35f, 3.65f
GameObject 182548 casts spell ID 25143 coords 530, -2250.4f, 3120.7f, 27.3f, 4.724170f
GameObject 184500 casts spell ID 25650 coords 530, -588.9f, 4070.8f, 93.8f, 4.724170f
GameObject 184501 casts spell ID 25652 coords 530, -2263, 3111.45f, 136.35f, 3.65f
GameObject 184502 casts spell ID 35376 coords 0, 1805.823975f, 334.009796f, 70.397469f, 4.724170f
GameObject 184503 casts spell ID 35727 coords 530, 10021.254883f, -7014.893066f, 49.717690f, 4.00532f
GameObject 187056 casts spell ID 44876 that triggers spell ID 44870
GameObject 187428 casts unexistant spell ID 45367 coords 530, 12791.350586f, -6891.479004f, 31.322657f, 5.336779f
GameObject 187431 casts unexistant spell ID 45370 coords 530, 12782.415039f, -6879.196289f, 23.106073f, 2.222675f
GameObject 188173 casts spell ID 46841 coords 530, 12558.393555f, -6774.535645f, 15.027822f, 0.035100f
Coords are from ArcScripts.
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
1

#2 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 12 December 2010 - 06:01 PM

View PostMarforius, on 11 December 2010 - 09:10 AM, said:

Would assume 22 is correct, if im correct.


All translocation orbs are goobers for sure. About others I dunno.
Posted Image
0

#3 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 02 January 2011 - 10:00 AM

r4012 fixed the first group of spells (the ones with EffectBasePoints_x <= 0). After some more researches I figured out that they are not 45 spells but just 10. This is the query I used to found them (note: I don't know SQL so it may look awful) :

Quote

SELECT entry, NAME, unknown1, spellfocus FROM whydb.gameobject_names WHERE ((TYPE = 22 AND spellfocus != 0 AND spellfocus IN (SELECT id FROM spells.dbc_spell WHERE ((Effect_1 = 77 AND EffectBasePoints_1 <= 0) OR (Effect_2 = 77 AND EffectBasePoints_2 <= 0) OR (Effect_3 = 77 AND EffectBasePoints_3 <= 0)) AND (Effect_1 != 5 AND Effect_2 != 5 AND Effect_3 != 5) AND (NAME LIKE "%Translocate%" OR NAME LIKE "%Portal to%" OR NAME LIKE "%Portal Effect%" OR NAME LIKE "%Teleport%"))) OR (TYPE = 10 AND unknown1 != 0 AND unknown1 IN (SELECT id FROM spells.dbc_spell WHERE ((Effect_1 = 77 AND EffectBasePoints_1 <= 0) OR (Effect_2 = 77 AND EffectBasePoints_2 <= 0) OR (Effect_3 = 77 AND EffectBasePoints_3 <= 0)) AND (Effect_1 != 5 AND Effect_2 != 5 AND Effect_3 != 5) AND (NAME LIKE "%Translocate%" OR NAME LIKE "%Portal to%" OR NAME LIKE "%Portal Effect%" OR NAME LIKE "%Teleport%"))));

This selects the gameobjects of type 10 (goober) and type 22 (spellfocus) that have respectively as unknown1/spellfocus field an existing spell with at least one script effect (77) but no teleport effect (5) and EffectBasePoints_x (with x the index of the script effect) <= 0, meaning that they don't trigger any other spell.
resulting in the gameobjects 182543, 182546, 182547, 182548, 184500, 184501, 184502, 184503, 191230, 193772, most of them called "Orbs Of Translocation".
Note for World Database teams: fill the teleport_coords table with the coordinates required by these spells. This is a default handler so it doesn't check things like required level, faction, reputation, completed quests, dress code, etc etc etc
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#4 User is offline   MesoX 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 296
  • Joined: 15-June 08
  • Gender:Male
  • Location:Czech Republic
  • Interests:pc & girls & parties

Posted 02 January 2011 - 11:51 AM

View PostSaintJamesApostle, on 02 January 2011 - 10:00 AM, said:

This is a default handler so it doesn't check things like required level, faction, reputation, completed quests, dress code, etc etc etc


What about extending teleport_coords with those fields like required level, reputation etc?
Posted Image
0

#5 User is offline   jackpoz 

  • ArcEmu Lemon Priest
  • PipPipPipPipPipPipPipPip
  • Group: Developers
  • Posts: 2,153
  • Joined: 19-June 08
  • Gender:Male
  • Location:Italy
  • Server OS:Windows

Posted 02 January 2011 - 12:13 PM

Well, would be nice first to know which spells/gameobjects require what(lvl, rep...).
Posted Image We develop dreams. Your dreams ;)
Posted ImagePosted Image
0

#6 User is offline   Sadikum 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 16-June 08
  • Gender:Male

Posted 02 January 2011 - 04:21 PM

Only two of the spells you've reported are missing from whydb's teleport_coords table.
Here the coords for them:
INSERT INTO `teleport_coords` VALUES ('54620', 'Teleport Crystal: Teleport to Dalaran AICast Script', '571', '5732.47', '1016.42', '174.48', '0');
INSERT INTO `teleport_coords` VALUES ('58622', 'Teleport to Lake Wintergrasp', '571', '4561.58', '2835.33', '389.79', '0');


I'm not 100% sure about these coords, I've taken coords from other spells which teleport to the same place and which are in teleport_coords. It's way better than nothing I think. There'll be in the next changeset of WhyDB. Thanks you Jackpoz for your research.
Sorry for my english, I'm french.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users