• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction First items in talkactions

Onimusha

Advanced OT User
Joined
Dec 6, 2008
Messages
292
Reaction score
208
Location
Japan
GitHub
_____________________Im___________________sexy_and
Twitch
_______________________I__________________know__it
Hello guys, this is my first talkaction script

talkactions.xml
Code:
<talkaction words="!kit;!kitnb;!firstitens;!itens" event="script" value="fitens.lua"/>
LUA:
 <talkaction words="!frags;/frags" event="script" value="frags.lua"/> - Pastebin.com[/url]

fitens.lua
[code]
--[[
Autores: Eratsu & MaXwEnDeLl
Quer ter outros scripts de ótima qualidade?
Acesse www.TibiaKing.com
]]--

local storage = 15482 --dont touch
local vocations = {
     [0] = { -- No vocation
     left_hand = 2190,
     right_hand = 2525,
     helmet = 2457,
     armor = 2463,
     legs = 2647,
     bp = 1988,
     boots = 2643
    
},
[1] = { -- Sorcerer
     left_hand = 2190,
     right_hand = 2525,
     helmet = 2457,
     armor = 2463,
     legs = 2647,
     bp = 1988,
},
[2] = { -- Druid
     left_hand = 2182,
     right_hand = 2525,
     helmet = 2457,
     armor = 2463,
     legs = 2647,
     bp = 1988,
},
[4] = { -- Knight
     left_hand = 2383,
     right_hand = 2525,
     helmet = 2457,
     armor = 2463,
     legs = 2643,
     bp = 1988,
},
[3] = { -- Paladin
     left_hand = 2389,
     right_hand = 2525,
     helmet = 2457,
     armor = 2463,
     legs = 2647,
     bp = 1988,
},
}
function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid, storage) < 1 then
         local it = vocations[getPlayerVocation(cid)]
        
         doPlayerAddItem(cid, it.helmet, 1, false, 1)
         doPlayerAddItem(cid, it.bp, 1, false, 3)
         doPlayerAddItem(cid, it.armor, 1, false, 4)
         doPlayerAddItem(cid, it.right_hand, 1, false, 5)
         doPlayerAddItem(cid, it.left_hand, 1, false, 6)
         doPlayerAddItem(cid, it.legs, 1, false,7)
         doPlayerAddItem(cid, it.boots, 1, false, 8)
        
         doPlayerSendCancel(cid, "Você ganhou itens iniciais de " .. getPlayerVocationName(cid) .. ".")
         setPlayerStorageValue(cid, storage, 1)
else
     doPlayerSendCancel(cid, "Você ja ganhou os itens da vocação " .. getPlayerVocationName(cid) .. ".")
end

return true
end
[url=http://pastebin.com/V6m5wW86]
LUA:
 --[[ Autores: Eratsu & MaXwEnDeLl Quer ter outros scripts de ótima qualidade? - Pastebin.com[/url]
 
Last edited:
Back
Top