Jump to content
×
×
  • Create New...
  • 0

Adicionar storage a talkaction


Question

Boa noite rapazeada do Xtibia, alguém poderia me ajudar com uma criação de um script? estou precisando dela pra adicionar em uma quest de "promotion" no meu servidor.
Se alguém poder adicionar uma storage a esse talkaction eu iria ficar muito grato!
Preciso que os players so possam usar a talkaction, no caso "transformar" para proxima transformação se tiverem o storage "xxxx" o Storage eu irei colocar em um npcs pra conseguir no final de uma quest.

 

 

local config = {
--[vocation id] = { level, nova voc, looktype, efeito}
-- Goku
[1] = { 25, 2, 6, 112},
-- Vegeta
[14] = { 25, 15, 22, 114},
-- Piccolo
[27] = { 25, 28, 34, 111},
-- C17
[40] = { 25, 41, 47, 34},
-- FUTURE TRUNKS
[53] = { 25, 54, 74, 114},
-- CELL
[66] = { 25, 67, 1005, 521},
-- Freeza
[79] = { 25, 80, 89, 123},
-- Majim Boo
[92] = { 25, 93, 1056, 14},
-- BROLLY
[105] = { 25, 106, 113, 126},
-- C18
[118] = { 25, 119, 121, 117},
-- UUB
[131] = { 25, 132, 128, 14},
-- COOLA
[144] = { 25, 145, 153, 444},
-- DENDE
[157] = { 25, 158, 165, 117},
-- TSUFUR
[170] = { 25, 171, 175, 117},
-- BARDOCK
[183] = { 25, 184, 189, 117},
-- KURIRIN
[196] = { 25, 197, 200, 117},
-- PAN
[209] = { 25, 210, 210, 117},
-- KAIOHSHIN
[222] = { 25, 223, 219, 117},
-- JANEMBA
[429] = { 25, 235, 234, 117},
-- TENSHINHAN
[247] = { 25, 248, 242, 117},
-- RADITZ
[260] = { 25, 261, 264, 117},
-- C16
[273] = { 25, 274, 272, 117},
-- TURLES
[286] = { 25, 287, 281, 117},
-- BULMA
[299] = { 25, 300, 292, 117},
-- SHENRON
[312] = { 25, 313, 302, 117},
-- VEGETTO
[325] = { 25, 326, 308, 117},
-- TAPION
[338] = { 25, 339, 950, 117},
-- KAME
[351] = { 25, 352, 330, 117},
-- KAGOME
[364] = { 25, 365, 353, 117},
-- ZAIKO
[377] = { 25, 378, 991, 117},
-- CHILLED
[390] = { 25, 391, 375, 117},
-- C8
[403] = { 25, 404, 512, 117},
-- FROST
[416] = { 25, 417, 713, 117},

-- Vocações vip

-- BILLS
[1000] = { 25, 1001, 625, 113},
-- CHAMPA
[1013] = { 25, 1014, 984, 113},
-- Gin
[1026] = { 50, 1027, 668, 115},
-- KITERA
[1039] = { 50, 1040, 746, 114},
-- VERMODO
[1052] = { 25, 1053, 979, 116},
-- LIQUIIR
[1076] = { 800, 1077, 771, 114}


}

function onSay(cid, words, param, channel)
local storage = 157
local waittime = 1

if exhaustion.check(cid, storage) then
doPlayerSendCancel(cid, "Aguarde, você não pode transformar tão rapido!")
return false
end

exhaustion.set(cid, storage, waittime)


local voc = config[getPlayerVocation(cid)]
if voc then
if getPlayerLevel(cid) >= voc[1] then
doPlayerSetVocation(cid, voc[2])
doCreatureSay(cid, "AHHHH!!!", 19)
local outfit = {lookType = voc[3]}
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid), voc[4])
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Voce precisa estar no level " .. voc[1] .. " para transformar.")
end
else
doPlayerSendCancel(cid, "Nao é possível se transformar.")
end


return true
end

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now