EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Spell Support (https://www.eqemulator.org/forums/forumdisplay.php?f=664)
-   -   Ports (https://www.eqemulator.org/forums/showthread.php?t=37519)

Township EQ 11-14-2013 08:07 PM

Ports
 
So I've been trying to make custom teleport spells for awhile now and I'm a bit confused about something.

http://gyazo.com/f939a3d77bddf48ece217a3e9ea1c0f7.png

This is Circle of Commons.

Casting it teleports me to 1427.0, 478.0, -51.9, heading=162.5

I've tried making custom ones many times before (not this one exactly) but I always run into the problem that my locations get wonky. So what does each value even do?

What is 325 at the bottom? is 478 the Y loc? I've looked at another one and the value for teleport is 1 and then the Y loc where it teleports you is a whole different number. There seems to be some kind of voodoo ritual to making teleport spells that I don't understand, someone please help.

NatedogEZ 11-14-2013 08:17 PM

Code:

                                x = spell.base[1];
                                y = spell.base[0];
                                z = spell.base[2];
                                heading = spell.base[3];

Copied right from the source in spell_effects.cpp

so...

Y
X
Z
H -- seems to be half of what the H value is ... so if its 500 guessing the heading it ports you at would be 250? .. not 100% sure :)


In perl scripts I always DOUBLE the heading to get them to face the way I want them to... so if I want them to face 125 .. i put 250 ..ect ect.. not sure why it works that way.. but it seems to work :)

Township EQ 11-14-2013 09:47 PM

Quote:

Originally Posted by NatedogEZ (Post 225980)
Code:

                                x = spell.base[1];
                                y = spell.base[0];
                                z = spell.base[2];
                                heading = spell.base[3];

Copied right from the source in spell_effects.cpp

so...

Y
X
Z
H -- seems to be half of what the H value is ... so if its 500 guessing the heading it ports you at would be 250? .. not 100% sure :)


In perl scripts I always DOUBLE the heading to get them to face the way I want them to... so if I want them to face 125 .. i put 250 ..ect ect.. not sure why it works that way.. but it seems to work :)

That makes a bit more sense. The whole doubling the heading might fix another unrelated issue I'm having. It seems like some zonelines I can't edit, and for a fix to that I've made invisible npcs that zone you when you enter their proximity.

Code:

    quest::movepc(4,-2425,1270,-1.2,142.1);
For some reason no matter what I change the "142.1" to it doesn't have any effect. I've also tried putting the heading in brackets like it says on the wiki, but nothing. Is there something I'm doing wrong with this?

Kingly_Krab 11-14-2013 10:12 PM

Brackets mean the field is optional and not necessary, I don't see anything that you're doing wrong, it's weird.
Code:

quest::movepc(zone id,x,y,z,[heading]) - Moves the user that triggered the Event to the provided zone and location.

Township EQ 11-15-2013 12:12 AM

Quote:

Originally Posted by NatedogEZ (Post 225980)
Code:

                                x = spell.base[1];
                                y = spell.base[0];
                                z = spell.base[2];
                                heading = spell.base[3];

Copied right from the source in spell_effects.cpp

so...

Y
X
Z
H -- seems to be half of what the H value is ... so if its 500 guessing the heading it ports you at would be 250? .. not 100% sure :)


In perl scripts I always DOUBLE the heading to get them to face the way I want them to... so if I want them to face 125 .. i put 250 ..ect ect.. not sure why it works that way.. but it seems to work :)

Quote:

Originally Posted by Kingly_Krab (Post 225984)
Brackets mean the field is optional and not necessary, I don't see anything that you're doing wrong, it's weird.
Code:

quest::movepc(zone id,x,y,z,[heading]) - Moves the user that triggered the Event to the provided zone and location.

I see.

Alright then, thanks guys!


All times are GMT -4. The time now is 07:17 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.