• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

GLOBALEVENTS With text+magic effect

rox666

Active Member
Joined
May 19, 2011
Messages
702
Reaction score
26
Location
why would i tell you
Hello, as many people asked me how to.. "globalevents" with text and magic effect.. i gonna explain it today here out :

First go data/globalevents/script

Name Something "spawns.lua"

this is an script :
Lua:
function onThink(interval, lastExecution)

local pos = {x=, y= z=} <- positions


local text = "Easy" <- a text
local effect = 35   <- this is effect like "blue" red or something



doSendAnimatedText(pos, text, effect)
doSendMagicEffect(pos, 47)<- magic effects
doSendMagicEffect(pos, 53)<- magic effects

return TRUE
end

after you do that then go back in data/globalevents then enter globalevents.xml

put this

XML:
<globalevent name="spawns" interval="1" event="script" value="spawns.lua"/>

What does Interval means? its like exhaustion if its 1 it will show every 1 sec if you put 2 then 2 sec exhausted or more.. so good luck for people who dont know to edit this. Its so really easy i explained enough i hope so.. if this helped to someone rep++ if possible. kkthxbye :)
 
doesnt work dude =\ i try to use it but it said theres an error near end
 
Try:
PHP:
function onThink(interval, lastExecution)
	local pos = {x = 10, y = 10, z = 7}
	local text = "Easy"
	doSendAnimatedText(pos, text, TEXTCOLOR_BLUE)
	doSendMagicEffect(pos, 47)
	doSendMagicEffect(pos, 53)
	return TRUE
end
 
Here is mine version with config and 'multi-text`.
Lua:
local config = {
{['pos'] = {x=50,y=50,z=7}, ['text'] = "Hail OTLand", ['color'] = COLOR_RED, ['effect'] = 35},
{['pos'] = {x=50,y=50,z=7}, ['text'] = "Hail OTLand", ['color'] = COLOR_BLUE, ['effect'] = 35},
{['pos'] = {x=50,y=50,z=7}, ['text'] = "Hail OTLand", ['color'] = COLOR_WHITE, ['effect'] = 35}
}
local Erexo_is_an_author = true;

function onThink(interval, lastExecution)
if Erexo_is_an_author then
	for i = 1, #config do
		doSendAnimatedText(config[i].pos, config[i].text, config[i].color)
		doSendMagicEffect(config[i].pos, config[i].effect)
	end
end
return TRUE
end

Not tested but should works.
 
Back
Top