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

Talkaction Spell

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
Hello,
I don't know make spells in talkaction.
I need Learn!!

Light.LUA:
PHP:
local mana = -20
local lightLevel = ??
local lightColor = ??
local time = ??
local playerMsg = Lux

function onSay(cid, words, param)
	if getPlayerAccess(cid) ~= 0 then
	  doPlayerAddMana(cid, mana)
	  doSetCreatureLight(cid, lightLevel, lightColor, time)
	  doCreatureSay(cid, playerMsg, 16)
  end
end

Talkactions.XML:
PHP:
	<talkaction words="lux" script="spells/light.lua" />

I need Learn some spells in talkaction.
 
Last edited:
When you include files, and want to use variables from that file, make sure they are not local, they shall be global!
 
It is for thus making?

PHP:
function onSay(cid, words, param)
	if getPlayerAccess(cid) ~= 0 then
	  doPlayerAddMana(cid, -20)
	  doSetCreatureLight(cid, ??, ??, ??)
	  doCreatureSay(cid, Lux, 16)
  end
end
 
Back
Top