Eclipse
January 05, 2009, 06:31:32 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Chat Help Rules Arcade Search Calendar Gallery Login Register  
 
 
 
Recent Topics +-
Spike's Adminishness! by The Tribal
Today at 06:31:04 PM

Does anybody know the math involved in dmg to def? by Syner
Today at 06:30:40 PM

My New Computer! by The BanHammer! [Thor!]
Today at 06:25:05 PM

Disparity Recruiting by The Tribal
Today at 06:24:51 PM

[E++] Fun with sprites! by Simius Cruentus
Today at 06:23:18 PM

how will the person above die. by The Tribal
Today at 06:20:30 PM

Need forum logos by ʇıunpp ʎqɹıʞ࣭
Today at 06:19:31 PM

Eclipse Traffic by Simius Cruentus
Today at 06:16:37 PM

Color Association by Gwendalin
Today at 06:16:34 PM

Post Your Desktop. by Gwendalin
Today at 06:11:56 PM

Members Online +-
17 Guests, 19 Users
Syner,
calamity,
EnigmaticSoul,
Sk3wer,
FS:CG Admin[Shadowwulf],
The Tribal,
Peter,
Echo ♥ Pie,
Zananok,
tiggilyboo,
Hikaru,
grenegg1,
The BanHammer! [Thor!],
Gwendalin,
Simius Cruentus,
Spike,
ʇıunpp ʎqɹıʞ࣭,
Electrokinesis,
Kreator
Pages: [1] 2
  Print  
Author Topic: Teleport spell (SAME MAP just moves forward)  (Read 2957 times)
0 Members and 1 Guest are viewing this topic.
Simius Cruentus
Developer
Advanced Eclipser
*
Online Online

Posts: 1,659



View Profile Email
« on: November 11, 2006, 12:55:29 PM »



this moves your character up 5 spaces depending on their direction.
We are going to set this spell's case to 0.
scripting skill needed 2/5 - ready for using, unless you use scrolling. easily edited.
Code: [Select]
Case 0
Dir=GetPlayerDIr(Index)
if GetPlayerMP(Index) > 10 then
call setPlayerMP(Index, int(GetPlayerMP(Index) - 10))
call sendMP(Index)
Select Case dir
Case 0
if GetPlayerY(Index) - 5 >= 0 then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-5)
call SpellAnim(1,GetPlayerMap(Index), GetPlayerx(Index), GetPlayerY(Index))
else
Call PlayerMsg(Index, "The spell fails.", 1)
end if
Case 1
if GetPlayerY(Index) + 5 <= 14 then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)+5)
call SpellAnim(1,GetPlayerMap(Index), GetPlayerx(Index), GetPlayerY(Index))
else
Call PlayerMsg(Index, "The spell fails.", 1)
end if
Case 2
if GetPlayerX(Index) - 5 >= 0 then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)-5, GetPlayerY(index))
call SpellAnim(1,GetPlayerMap(Index), GetPlayerx(Index), GetPlayerY(Index))
else
Call PlayerMsg(Index, "The spell fails.", 1)
end if
Case 3
if GetPlayerX(Index) + 5 <= 19 then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)+5, GetPlayerY(index))
call SpellAnim(1,GetPlayerMap(Index), GetPlayerx(Index), GetPlayerY(Index))
else
Call PlayerMsg(Index, "The spell fails.", 1)
end if
End Select
end if
Change spellanim to what you want for animation. change all the 5's to the amount you want. This script warps players forward. the spell is set to fail if the destination is off the map. (has to be changed for scrolling).
max in nonscrolling (x): 19
max in nonscrolling (y): 14
change those to the max in scrolling, if the map is scrolling.
Sangann
Newb
*
Offline Offline

Posts: 22


View Profile Email
« Reply #1 on: December 14, 2006, 01:21:25 PM »

This doesn't work for me for some reason. All it does is take away the 10 MP, but doesn't actually teleport me. Any idea why its not working?
SwiftDeathSK
Owner of SK Interactive
Advanced Member
****
Offline Offline

Posts: 591


I have returned... WITH COOKIES!


View Profile WWW Email
« Reply #2 on: December 14, 2006, 01:33:21 PM »

o.0 dont take this the wrong way, but what can this script be used for? i cant think of anything that needs the player to move up 5 tiles by using a spell...
Grim_Reaper
~Suffering~
Active Member
***
Offline Offline

Posts: 438


You dare enter my dominion?


View Profile Email
« Reply #3 on: December 21, 2006, 02:40:08 PM »

o.0 dont take this the wrong way, but what can this script be used for? i cant think of anything that needs the player to move up 5 tiles by using a spell...

maybe theres a mage class and the guys have to pass a ton of blocks to get to the trainer...
renegade545
The King of all Forums
Active Member
***
Offline Offline

Posts: 111



View Profile WWW Email
« Reply #4 on: December 21, 2006, 03:13:59 PM »

Cool script, i have seen ones like these before. i think it is for faster travelling or something like that.
Simius Cruentus
Developer
Advanced Eclipser
*
Online Online

Posts: 1,659



View Profile Email
« Reply #5 on: December 23, 2006, 06:50:31 PM »

o.0 dont take this the wrong way, but what can this script be used for? i cant think of anything that needs the player to move up 5 tiles by using a spell...
I use it for a mage class. thats the point.
This doesn't work for me for some reason. All it does is take away the 10 MP, but doesn't actually teleport me. Any idea why its not working?
it should work.
SwiftDeathSK
Owner of SK Interactive
Advanced Member
****
Offline Offline

Posts: 591


I have returned... WITH COOKIES!


View Profile WWW Email
« Reply #6 on: January 04, 2007, 12:39:26 PM »

o.0 dont take this the wrong way, but what can this script be used for? i cant think of anything that needs the player to move up 5 tiles by using a spell...
I use it for a mage class. thats the point.
This doesn't work for me for some reason. All it does is take away the 10 MP, but doesn't actually teleport me. Any idea why its not working?
it should work.


soo.... what exactly does the mage use this spell for? is there a true purpose? or is it just to move around faster, like renegade said?
Simius Cruentus
Developer
Advanced Eclipser
*
Online Online

Posts: 1,659



View Profile Email
« Reply #7 on: January 04, 2007, 01:22:48 PM »

o.0 dont take this the wrong way, but what can this script be used for? i cant think of anything that needs the player to move up 5 tiles by using a spell...
I use it for a mage class. thats the point.
This doesn't work for me for some reason. All it does is take away the 10 MP, but doesn't actually teleport me. Any idea why its not working?
it should work.


soo.... what exactly does the mage use this spell for? is there a true purpose? or is it just to move around faster, like renegade said?

I dont know about your game but in mine I got like these pits in some dungeon maps that would kill you if you touch them. There is like a button located on the otherside so you sortof have to have a mage friend to open the door. Ill post a screen shot soon.

SwiftDeathSK
Owner of SK Interactive
Advanced Member
****
Offline Offline

Posts: 591


I have returned... WITH COOKIES!


View Profile WWW Email
« Reply #8 on: January 05, 2007, 07:08:09 AM »

o.0 dont take this the wrong way, but what can this script be used for? i cant think of anything that needs the player to move up 5 tiles by using a spell...
I use it for a mage class. thats the point.
This doesn't work for me for some reason. All it does is take away the 10 MP, but doesn't actually teleport me. Any idea why its not working?
it should work.


soo.... what exactly does the mage use this spell for? is there a true purpose? or is it just to move around faster, like renegade said?

I dont know about your game but in mine I got like these pits in some dungeon maps that would kill you if you touch them. There is like a button located on the otherside so you sortof have to have a mage friend to open the door. Ill post a screen shot soon.




aaaaah... i see :P i wasnt thinking about passing thru walls lol, i was thinking you made it for moving forward in air, not going thru stuff >_< Do'h!
jiros
347 1330!!
Active Member
***
Offline Offline

Posts: 174



View Profile WWW Email
« Reply #9 on: January 10, 2007, 01:56:10 PM »

nice thought, i was thinking about a spell that is called "Evade" or whatever, that allows you to evade attacks in the style of dbz, or remember the last  level of the matrix path of Neo?  did not test it but will sure do very soon!
Seba
Veteran
Advanced Eclipser
*
Offline Offline

Posts: 1,006



View Profile Email
« Reply #10 on: January 14, 2007, 07:13:43 PM »

Not working for me I use TE.  It just doesn't work any help.. Doesn't take MP or anything
jiros
347 1330!!
Active Member
***
Offline Offline

Posts: 174



View Profile WWW Email
« Reply #11 on: January 16, 2007, 04:09:35 AM »

nope isn't working for me either, also using TE, too bad  :-|
unixfr3ak
Member
**
Offline Offline

Posts: 74


Green Dixy The Source is Your End


View Profile Email
« Reply #12 on: October 31, 2007, 09:13:02 PM »

i added it in propper
when i reload scripts i get this

"script compile error: 1002 (syntax error) at line "Case 2". Warning scripts may not work

Code: [Select]
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub ScriptedSpell(index, Script)                                 
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Select Case Script
Case 0
Dir=GetPlayerDIr(Index)
if GetPlayerMP(Index) > 10 then
call setPlayerMP(Index, int(GetPlayerMP(Index) - 10))
call sendMP(Index)
Select Case dir
Case 0
if GetPlayerY(Index) - 5 >= 0 then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)-5)
call SpellAnim(1,GetPlayerMap(Index), GetPlayerx(Index), GetPlayerY(Index))
else
Call PlayerMsg(Index, "The spell fails.", 1)
end if
Case 1
if GetPlayerY(Index) + 5 <= 14 then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)+5)
call SpellAnim(1,GetPlayerMap(Index), GetPlayerx(Index), GetPlayerY(Index))
else
Call PlayerMsg(Index, "The spell fails.", 1)
end if
Case 2
if GetPlayerX(Index) - 5 >= 0 then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)-5, GetPlayerY(index))
call SpellAnim(1,GetPlayerMap(Index), GetPlayerx(Index), GetPlayerY(Index))
else
Call PlayerMsg(Index, "The spell fails.", 1)
end if
Case 3
if GetPlayerX(Index) + 5 <= 19 then
Call PlayerWarp(index, GetPlayerMap(index), GetPlayerX(index)+5, GetPlayerY(index))
call SpellAnim(1,GetPlayerMap(Index), GetPlayerx(Index), GetPlayerY(Index))
else
Call PlayerMsg(Index, "The spell fails.", 1)
end if
   End Select
end if
RamBONE
Chit Chat God
Teh Uberleet
*****
Offline Offline

Posts: 3,876


Creative Scripter


View Profile Email
« Reply #13 on: November 03, 2007, 07:44:05 PM »

this only for TE?
Munro
Moderator
Advanced Eclipser
*
Offline Offline

Posts: 1,397


View Profile Email
« Reply #14 on: November 03, 2007, 08:32:40 PM »

this only for TE?

anything that works with TE works in EE
RamBONE
Chit Chat God
Teh Uberleet
*****
Offline Offline

Posts: 3,876


Creative Scripter


View Profile Email
« Reply #15 on: November 10, 2007, 04:36:38 PM »

do we literally change the words "spellanim" to the animation number?
unnown
Teh Uberleet
*****
Offline Offline

Posts: 3,659


-Admin-


View Profile Email
« Reply #16 on: November 12, 2007, 07:34:39 AM »

yeah...
RamBONE
Chit Chat God
Teh Uberleet
*****
Offline Offline

Posts: 3,876


Creative Scripter


View Profile Email
« Reply #17 on: November 12, 2007, 11:11:52 AM »

well... i didnt' change anything i just pasted it in scripted spells with the right cases and stuff and it alerady did a cool animation so i guess not...
cakemixcore
I C WUT U DO THAR
Member
**
Offline Offline

Posts: 65


View Profile WWW Email
« Reply #18 on: November 23, 2007, 09:52:31 AM »

Can I make it stop at a blocked tile?
RamBONE
Chit Chat God
Teh Uberleet
*****
Offline Offline

Posts: 3,876


Creative Scripter


View Profile Email
« Reply #19 on: November 23, 2007, 03:27:17 PM »

if you do it onto a blockd tile like lets say im in a map that looks like this
( x equals blockd) ( and 0 means where u are)

  x   x    x     x
  x   x    x     x
  x   x    0     x
  x   x    x     x

so i fi teleport one spcwe up. and the whole map is blockd save where i am.
ill end up in a blockd space i'll be able to move from blockd tile to blockd tile (without the spell) because eclipse wont let u get stuck

but yea u can tele righgt on to a block tile then pass that blroostered tile n go on ur way so no im pretty sure blockd tiles dont block teleing
Pages: [1] 2
  Print