Ir para conteúdo

Ajudem Me


angelanascimento

Posts Recomendados

[21/03/2012 18:11:51] Lua Script Error: [CreatureScript Interface]

[21/03/2012 18:11:51] in a timer event called from:

[21/03/2012 18:11:51] data/creaturescripts/scripts/login.lua:onLogin

 

[21/03/2012 18:11:51] luaGetCreaturePosition(). Creature not found

 

[21/03/2012 18:11:51] Lua Script Error: [CreatureScript Interface]

[21/03/2012 18:11:51] in a timer event called from:

[21/03/2012 18:11:51] data/creaturescripts/scripts/login.lua:onLogin

 

[21/03/2012 18:11:52] attempt to index a number value

[21/03/2012 18:11:52] stack traceback:

[21/03/2012 18:11:52] [C]: in function 'doSendAnimatedText'

[21/03/2012 18:11:52] data/lib/Pivi.lua:41: in function <data/lib/Pivi.lua:19>

[21/03/2012 18:11:53] Dig Din has logged in.

[21/03/2012 18:12:40] Dig Din has logged out.

 

[21/03/2012 18:12:41] Lua Script Error: [CreatureScript Interface]

[21/03/2012 18:12:41] in a timer event called from:

[21/03/2012 18:12:41] data/creaturescripts/scripts/login.lua:onLogin

 

[21/03/2012 18:12:41] luaGetCreaturePosition(). Creature not found

 

[21/03/2012 18:12:41] Lua Script Error: [CreatureScript Interface]

[21/03/2012 18:12:41] in a timer event called from:

[21/03/2012 18:12:41] data/creaturescripts/scripts/login.lua:onLogin

 

[21/03/2012 18:12:41] attempt to index a number value

[21/03/2012 18:12:42] stack traceback:

[21/03/2012 18:12:42] [C]: in function 'doSendAnimatedText'

[21/03/2012 18:12:42] data/lib/Pivi.lua:41: in function <data/lib/Pivi.lua:19>

 

Tenho Script Quem Quiser Mande Pm

Link para o comentário
Compartilhar em outros sites

Lib.lua

function doUseGem(cid, item)

local voc = getPlayerVocation(cid)

local interval = gems.interval[voc]

 

if item.itemid ~= gems.id[voc] or getPlayerStorageValue(cid, gems.storage[voc]) > 0 then

return FALSE

end

 

setPlayerStorageValue(cid, gems.storage[voc], 1)

sendGemEffect(cid, gems.storage[voc], gems.interval[voc])

doRemoveItem(item.uid, 1)

 

 

 

return TRUE

end

 

 

function sendGemEffect(cid, storage, interval)

local pos = getPlayerPosition(cid)

local voc = getPlayerVocation(cid)

local color = 1

if voc == 1 then

color = gemMsg.colorDruid[math.random(1,#gemMsg.colorDruid)]

elseif voc == 2 then

color = gemMsg.colorSorcerer[math.random(1,#gemMsg.colorSorcerer)]

elseif voc == 3 then

color = gemMsg.colorPaladin[math.random(1,#gemMsg.colorPaladin)]

elseif voc == 4 then

color = gemMsg.colorKnight[math.random(1,#gemMsg.colorKnight)]

elseif voc == 5 then

color = gemMsg.colorDruid[math.random(1,#gemMsg.colorElderDruid)]

elseif voc == 6 then

color = gemMsg.colorSorcerer[math.random(1,#gemMsg.colorMasterSorcerer)]

elseif voc == 7 then

color = gemMsg.colorPaladin[math.random(1,#gemMsg.colorRoyalPaladin)]

elseif voc == 8 then

color = gemMsg.colorKnight[math.random(1,#gemMsg.colorEliteKnight)]

end

 

doSendAnimatedText(pos, gemMsg.rnd[math.random(1,#gemMsg.rnd)], color)

if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) >= 1 then

addEvent(sendGemEffect, interval, cid, storage, interval)

end

end

 

function doRemoveGemEffect(cid)

if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) < 1 then

return FALSE

end

setPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)], 0)

return TRUE

end

 

function doRemoveAllGemEffect(cid)

for i = 1, table.maxn(gms.storage) do

setPlayerStorageValue(cid, gems.storage, 0)

end

return TRUE

end

 

function isGemActivated(cid)

if getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) > 0 then

return TRUE

end

return FALSE

end

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...