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

TalkAction GM make player speaks

samuel157

/root
Joined
Mar 19, 2010
Messages
447
Solutions
3
Reaction score
49
Location
São Paulo, Brazil
GitHub
Samuel10M
GM make player speaks

open talkcation/script create file .lua and place it

Code:
function onSay(cid, words, param, channel)
 
                if(param == '') then
                                return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "É necessário um paramêtro."), TRUE
                end
                
                local prm = string.explode(param, ",")
                local pos = getCreaturePosition(cid)
                local plr = getPlayerByName(prm[1])
                
                if (plr == nil) then
                  return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O player está offline ou não existe.")
                elseif (prm[2] == nil) then
                  return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "É necessário a mensagem após a vírgula.")  
                end
          
return doCreatureSay(plr, prm[2], 1), TRUE
end

then goes talkaction. xml and boot this tag

Code:
<talkaction log="yes" words="/ps" access="3" event="script" value="doplayersay.lua"/>

speaking /ps talaturen, exura

he did not loose magic only appears exura help to improve for speech and loose the spells
 
Lol, I remember this command from the old days
 
I get this when I put in:

[28/07/2012 13:46:18] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/doplayersay.lua:16: '<eof>' expected near 'end'
[28/07/2012 13:46:18] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/doplayersay.lua)
[28/07/2012 13:46:18] data/talkactions/scripts/doplayersay.lua:16: '<eof>' expected near 'end'
 
Back
Top