Lopaz
Member
Hello! I'm still pretty new here but i'll still make a tutorial to newcomers .
First go to Data/Globalevents and open globalevent.xml
Here you will see: <globalevents> copy this <globalevent name="effecttile" interval="2" script="effectile.lua"/> and put it under <globalevents>
interval="2" <--- 2 means how fast the effects and text should appear. (2 = after 2s)
Then it will look like this:
When you're done with it, go to Data/Globalevents/Scripts and make a .lua file there (or you can just copy a .lua file there).
If you made a 100% new lua file, then rename it to effectile.
If the .lua is a copy, change the name of it to effectile and open it. Remove everything in it until it's empty and then press save.
Copy this script and put it in the effectile.lua:
positions = {
["text here"] = { x = xxx, y = yyy, z = z },
["text here"] = { x = xxx, y = yyy, z = z },
This means where the text and effect should be. Example:
["Trainers"] = { x = 1000, y = 1000, z = 7 },
Now I will explain alittle what they do.
effects = {
CONST_ME_MAGIC_BLUE,
CONST_ME_MAGIC_GREEN,
CONST_ME_MORTAREA
This means what effects that will appear on the Portal.
CONST_ME_MAGIC_BLUE, is blue sparkles
CONST_ME_MAGIC_GREEN, is green sparkles
CONST_ME_MORTAREA is sudden death
colors = {
TEXTCOLOR_WHITE,
TEXTCOLOR_ORANGE,
TEXTCOLOR_GREEN,
TEXTCOLOR_BLUE
This means what color the text on the portal should have.
If you want an unique effect for a portal, then do almost everything as I said above but make a new .lua and name it to effectileeffecthere.
Example: effectilemort
^ This one for effectile sudden death effect.
Then you go back to your effectile .lua and copy everything and put it in effectilemort.lua.
At effects, remove everything EXCEPT:
effects = {
CONST_ME_MORTAREA
Because this one is sudden death. And then you just put the position of the portal and you're done
Rep++ if you find this useful ^^
First go to Data/Globalevents and open globalevent.xml
Here you will see: <globalevents> copy this <globalevent name="effecttile" interval="2" script="effectile.lua"/> and put it under <globalevents>
interval="2" <--- 2 means how fast the effects and text should appear. (2 = after 2s)
Then it will look like this:
XML:
<globalevents>
<globalevent name="effecttile" interval="2" script="effectile.lua"/>
When you're done with it, go to Data/Globalevents/Scripts and make a .lua file there (or you can just copy a .lua file there).
If you made a 100% new lua file, then rename it to effectile.
If the .lua is a copy, change the name of it to effectile and open it. Remove everything in it until it's empty and then press save.
Copy this script and put it in the effectile.lua:
Lua:
local config = {
positions = {
["text here"] = { x = xxx, y = yyy, z = z },
["text here"] = { x = xxx, y = yyy, z = z },
},
effects = {
CONST_ME_MAGIC_BLUE,
CONST_ME_MAGIC_GREEN,
CONST_ME_MORTAREA
},
colors = {
TEXTCOLOR_WHITE,
TEXTCOLOR_ORANGE,
TEXTCOLOR_GREEN,
TEXTCOLOR_BLUE
}
}
function onThink(cid, interval, lastExecution)
for text, pos in pairs(config.positions) do
doSendMagicEffect(pos, config.effects[math.random(1, #config.effects)])
doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
end
return TRUE
end
positions = {
["text here"] = { x = xxx, y = yyy, z = z },
["text here"] = { x = xxx, y = yyy, z = z },
This means where the text and effect should be. Example:
["Trainers"] = { x = 1000, y = 1000, z = 7 },
Now I will explain alittle what they do.
effects = {
CONST_ME_MAGIC_BLUE,
CONST_ME_MAGIC_GREEN,
CONST_ME_MORTAREA
This means what effects that will appear on the Portal.
CONST_ME_MAGIC_BLUE, is blue sparkles
CONST_ME_MAGIC_GREEN, is green sparkles
CONST_ME_MORTAREA is sudden death
colors = {
TEXTCOLOR_WHITE,
TEXTCOLOR_ORANGE,
TEXTCOLOR_GREEN,
TEXTCOLOR_BLUE
This means what color the text on the portal should have.
If you want an unique effect for a portal, then do almost everything as I said above but make a new .lua and name it to effectileeffecthere.
Example: effectilemort
^ This one for effectile sudden death effect.
Then you go back to your effectile .lua and copy everything and put it in effectilemort.lua.
At effects, remove everything EXCEPT:
effects = {
CONST_ME_MORTAREA
Because this one is sudden death. And then you just put the position of the portal and you're done
Rep++ if you find this useful ^^
Last edited: