• 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!

I Need Help

laccc

New Member
Joined
Jul 15, 2008
Messages
23
Reaction score
0
Hello people I need a help ..
I need the script that they are coming fireworks around the gamemaster..sorry for my English
 
Zyntax, I do not need an action, and yes to a script (global event, creature script, talk) to release fireworks automatic full screen is that the gamemaster
 
I know my english is bad, but ... what the hell? :o

Oooh! So you wan't either a talkaction or an global event to be executed
and fireworks shall be spread over the screen?
 
yes I want a script that the gm (gamemaster) log on screen it flashes fireworks .. or may be a talk that does the same function ..
you speak Portuguese?,sorry for my English
 
maybe a gm spell? easiest to do :D

just precize which effect it have to be

fast example:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREWORK_RED)


local area = createCombatArea(AREA_CROSS6X6)
setCombatArea(combat, area)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

and in spells.xml
Code:
<instant name="spellname" words="words" lvl="9" mana="20" aggressive="0" selftarget="1" exhaustion="1000" needlearn="1" event="script" value="scriptname.lua"></instant>

should work :D(change spell name, script name and words to something you want
 
Last edited:
friend, so I'll have to speak the magic all the time, I need one that is altomatico, type on login ..

I have this script to modify:

---Config---
--Storage do vip
local Storage = 13540
--Efeito
local Effect = (CONST_ME_FIREWORK_BLUE,CONST_ME_FIREWORK_RED,CONST_ME_FIREWORK_YELLOW)
--Intervalo(em milisegundos, ou seja, 1 segundo = 1000 milisegundos)
local Interval = 5000

function onLogin(cid)
--Function
function animation(cid)
doSendMagicEffect(getCreaturePosition(cid), Effect)
ev = addEvent(animation, Interval, cid)
return true
end
if getPlayerStorageValue(cid, Storage) >= 1 then
ev = addEvent(animation, Interval, cid)
end
return true
end

function onLogout(cid)
if getPlayerStorageValue(cid, Storage) >= 1 then
stopEvent(ev)
end
return true
end
 
Last edited:
My Login :
local config = {
loginMessage = getConfigValue('loginMessage')
}

function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end

local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end

if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end

registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")

registerCreatureEvent(cid, "killer")
registerCreatureEvent(cid, "Idle")

registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, VipReceive)
registerCreatureEvent(cid, "PlayerKill")
if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 2 he must start from zero
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 3 he must start from zero
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena
return true
end
 
I assume this is what you want:

Code:
---Config---
local access = 3
--Efeito
local Effect = (CONST_ME_FIREWORK_BLUE,CONST_ME_FIREWORK_RED,CONS T_ME_FIREWORK_YELLOW)
--Intervalo(em milisegundos, ou seja, 1 segundo = 1000 milisegundos)
local Interval = 5000

function onLogin(cid)
--Function
function animation(cid)
doSendMagicEffect(getCreaturePosition(cid), Effect)
ev = addEvent(animation, Interval, cid)
return true
end
if getPlayerAccess(cid) >= access then
ev = addEvent(animation, Interval, cid)
end
return true
end

function onLogout(cid)
if getPlayerAccess(cid) >= access then
stopEvent(ev)
end
return true
end
 
Haven't tested it but anyway, in creaturescripts/scripts/login.lua add this at the end:
Code:
	if(getPlayerCustomFlagValue(cid, PlayerCustomFlag_GamemasterPrivileges)) then
	local combat = createCombatObject()
	setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREWORK_RED)

arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

local area = createCombatArea(arr)
setCombatArea(combat, area)
		return doCombat(cid, combat, var)
	end
 
Code:
local arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

local config = {
loginMessage = getConfigValue('loginMessage'),
access = 4  --here put minimal access to activate fireworks
}
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_FIREWORK_RED)
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end
	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end
	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")

registerCreatureEvent(cid, "killer")
registerCreatureEvent(cid, "Idle")

registerCreatureEvent(cid, "attackguild")
registerCreatureEvent(cid, "advance")
registerCreatureEvent(cid, "FimVip")
registerCreatureEvent(cid, "SkullCheck")
registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, VipReceive)
registerCreatureEvent(cid, "PlayerKill")
if (InitArenaScript ~= 0) then
	InitArenaScript = 1
	-- make arena rooms free
	for i = 42300, 42309 do
		setGlobalStorageValue(i, 0)
		setGlobalStorageValue(i+100, 0)
	end
end
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
	for i = 42300, 42309 do
		setPlayerStorageValue(cid, i, 0)
	end
end
-- if he did not make full arena 2 he must start from zero
if getPlayerStorageValue(cid, 42319) < 1 then
	for i = 42310, 42319 do
		setPlayerStorageValue(cid, i, 0)
	end
end
-- if he did not make full arena 3 he must start from zero
if getPlayerStorageValue(cid, 42329) < 1 then
	for i = 42320, 42329 do
	setPlayerStorageValue(cid, i, 0)
	end
end
if getPlayerStorageValue(cid, 42355) == -1 then
	setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena
if getPlayerAccess(cid)>= config.access then
	return doCombat(cid, combat, var) and true
else
return true
end
not tested, test gm and player login, and set in config access needed to send fireworks

hmm, damn right :D
 
I think your area 6x6 will give error, because it's only in spells/lib and don't have anything to do with creaturescripts
I would suggest you to do your own area, like I showed in my script.
 
@ Memphis. I use tfs 0.1.1.1, the error and the following:
Lua Script Error: [CreatureScripts Interface]
Date / creaturescripts / scripts / login.lua

luaGetPlayerCustomFlagValue <>. Player not found
 
Global event?
LUA:
function onThink(interval, lastExecution, thinkInterval)
	for _, pid in ipairs(getPlayersOnline()) do
		if getPlayerGroupId(pid) >= 3 then
			doSendMagicEffect(getCreaturePosition(pid), CONST_ME_FIREWORK_RED)
		end
	end
return true
end
 
name this script firework.lua put it in globalevents/scripts
LUA:
function onThink(interval, lastExecution, thinkInterval)
        for _, pid in ipairs(getPlayersOnline()) do
                if getPlayerGroupId(pid) >= 3 then
                       local fire = math.random(28,30)
                        doSendMagicEffect(getCreaturePosition(pid), fire)
                end
        end
return true
end

in globalevents.xml write

PHP:
<globalevent name="firework" event="script" value="firework.lua"/>
 
Last edited:
@zintax, worked perfectly, but I need the fireworks will reach the screen, and not soh where the gamemaster is ..
 
Last edited:
Back
Top