• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

doesnt do anything

IMac

entrepreneur
Joined
May 31, 2009
Messages
2,482
Reaction score
16
Location
Pluto
i got this mod in my server and it doesnt do anything i dont get any errors either

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="VIP_indicator" version="1.0" author="Syntax" contact="otland.net" enabled="yes">
	<globalevent name="Core_Indicator" interval="60" event="buffer"><![CDATA[
		for _, pid in ipairs(getPlayersOnline()) do
			if getPlayerPremiumDays(cid) > 0 then
				doSendAnimatedText(getCreaturePosition(pid), "VIP", COLOR_GREEN)
				doSendMagicEffect(getCreaturePosition, CONST_ME_GIFT_WRAPS)
			end
		end
]]></globalevent>
</mod>
 
doSendMagicEffect(getCreaturePosition(pid), CONST_ME_GIFT_WRAPS)
doSendAnimatedText(getCreaturePosition(pid), "VIP", TEXTCOLOR_GREEN)
if getPlayerPremiumDays(pid) > 0 then
;s
 
Last edited:
doSendMagicEffect(getCreaturePosition(pid), CONST_ME_GIFT_WRAPS)
;s

srry hafl of the script was mine and it was my first
still doesnt work

edit i switched them around and still now i get this error
[17/04/2010 18:39:15] [Lua Error]
[17/04/2010 18:39:15] [string "loadBuffer"]:7: ')' expected (to close '(' at line 6) near 'doSendAnimatedText'
 
Last edited:
Code:
function onThink(interval, lastExecution, thinkInterval)
	local cfg = {}
	cfg.storage = 19551 -- VIP Storage
	for _, cid in ipairs(getPlayersOnline()) do
		    if getPlayerPremiumDays(cid) > 0 then
			doSendAnimatedText(getThingPos(cid), "VIP", TEXTCOLOR_RED)
                        doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
		end
	end
	return true
end

global event
NO TESTED!
 
Code:
function onThink(interval, lastExecution, thinkInterval)
	local cfg = {}
	cfg.storage = 19551 -- VIP Storage
	for _, cid in ipairs(getPlayersOnline()) do
		    if getPlayerPremiumDays(cid) > 0 then
			doSendAnimatedText(getThingPos(cid), "VIP", TEXTCOLOR_RED)
                        doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
		end
	end
	return true
end

global event
NO TESTED!
what the hell is that?
 
should work
Code:
<?xml version="1.0" encoding="UTF-8"?> 
<mod name="VIP_indicator" version="1.0" author="Syntax" contact="otland.net" enabled="yes"> 
	<globalevent name="Core_Indicator" interval="60" event="buffer"><![CDATA[ 
		if getPlayerPremiumDays(cid) > 0 then
			doSendAnimatedText(getThingPos(cid), "VIP", TEXTCOLOR_GREEN)
			doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
		end 
		return true
	]]></globalevent> 
</mod>
if not try this;
Code:
<?xml version="1.0" encoding="UTF-8"?> 
<mod name="VIP_indicator" version="1.0" author="Syntax" contact="otland.net" enabled="yes"> 
	<globalevent name="Core_Indicator" interval="60" event="buffer"><![CDATA[
		for _, cid in ipairs(getPlayersOnline()) do
			if getPlayerPremiumDays(cid) > 0 then
				doSendAnimatedText(getThingPos(cid), "VIP", TEXTCOLOR_GREEN)
				doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
			end
		end
		return true
	]]></globalevent> 
</mod>
IF NOT;
Code:
<?xml version="1.0" encoding="UTF-8"?> 
<mod name="VIP_indicator" version="1.0" author="Syntax" contact="otland.net" enabled="yes"> 
	<globalevent name="Core_Indicator" interval="60" event="buffer"><![CDATA[
		for _, cid in ipairs(getPlayersOnline()) do
			if getPlayerPremiumDays(cid) > 0 then
				doSendAnimatedText(getThingPos(cid), "VIP", TEXTCOLOR_GREEN)
				doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
			end
			break
		end
		return true
	]]></globalevent> 
</mod>
 
:huh:

data/globalevents/globalevents.xml
Code:
<globalevent name="Animated Text" interval="3" event="script" value="script_name.lua"/>

data/globalevents/scripts/script_name.lua
Code:
function onThink(interval, lastExecution, thinkInterval)
	for _, cid in ipairs(getPlayersOnline()) do
		if isPremium(cid) then
			doSendAnimatedText(getThingPos(cid), "VIP", TEXTCOLOR_RED)
			doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
		end
	end
	return true
end
 
:huh:

data/globalevents/globalevents.xml
Code:
<globalevent name="Animated Text" interval="3" event="script" value="script_name.lua"/>

data/globalevents/scripts/script_name.lua
Code:
function onThink(interval, lastExecution, thinkInterval)
	for _, cid in ipairs(getPlayersOnline()) do
		if isPremium(cid) then
			doSendAnimatedText(getThingPos(cid), "VIP", TEXTCOLOR_RED)
			doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
		end
	end
	return true
end

thanks DBJ
 
Back
Top