Ir para conteúdo

Featured Replies

Postado
1 hora atrás, Zazeros disse:

@Joaovettor Cara, esta dando esse erro:

 

[31/10/2018 13:19:52] [Error - LuaInterface::loadFile] data/spells/scripts/especial/mode1.lua:6: 'then' expected near 'doPlayerSetVocation'
[31/10/2018 13:19:52] [Error - Event::checkScript] Cannot load script (data/spells/scripts/especial/mode1.lua)
[31/10/2018 13:19:52] data/spells/scripts/especial/mode1.lua:6: 'then' expected near 'doPlayerSetVocation'
[31/10/2018 13:19:52] [Error - LuaInterface::loadFile] data/spells/scripts/especial/mode2.lua:7: '=' expected near 'ï'
[31/10/2018 13:19:52] [Error - Event::checkScript] Cannot load script (data/spells/scripts/especial/mode2.lua)
[31/10/2018 13:19:52] data/spells/scripts/especial/mode2.lua:7: '=' expected near 'ï'

 

function onCastSpell(cid, var)
local male = 350
local female = 351
local sex = getPlayerSex(cid)
if sex == 0 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then
doPlayerSetVocation(cid, 7)
setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1)
doSetCreatureOutfit(cid, male)
elseif sex == 1 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then
doPlayerSetVocation(cid, 7)
setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1)
doSetCreatureOutfit(cid, female)
else
doPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada")
end
return doCombat(cid, combat, var)
end

Magia que cancela

function onCastSpell(cid, var)
local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local sex = getPlayerSex(cid)
if sex == 0 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then
doPlayerSetVocation(cid, 3)
setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1)
doSetCreatureOutfit(cid, male)
elseif sex == 1 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then
doPlayerSetVocation(cid, 3)
setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1)
doSetCreatureOutfit(cid, female)
else
doPlayerSendCancel(cid, "Você não pode usar esta magia")
end
return doCombat(cid, combat, var)
end

  • Respostas 17
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Mathias Kenfi
    Mathias Kenfi

    Aumente o attackspeed da vocacao 7 e simples   Segue o script \/     function onCastSpell (cid, var) local store,exausted = 156201,30 -- exaust na talk if getPlayerStora

Postado

@Joaovettor Cara, quando usa a magia para ir para a outra vocação, da esse erro do outfit: (mas a vocação ta trocando)

 

[31/10/2018 15:46:16] [Error - Spell Interface] 
[31/10/2018 15:46:16] data/spells/scripts/especial/mode2.lua:onCastSpell
[31/10/2018 15:46:16] Description: 
[31/10/2018 15:46:16] attempt to index a number value
[31/10/2018 15:46:16] stack traceback:
[31/10/2018 15:46:16]     [C]: in function 'doSetCreatureOutfit'
[31/10/2018 15:46:16]     data/spells/scripts/especial/feral mode.lua:12: in function <data/spells/scripts/especial/mode2.lua:1>
 

 

 

E quando vai usar a spell pra voltar. Da esse erro: (E da a mensagem de erro, não deixando o player voltar para a vocação antiga)

 

[31/10/2018 15:47:21] [Error - Spell Interface] 
[31/10/2018 15:47:21] data/spells/scripts/especial/mode1.lua:onCastSpell
[31/10/2018 15:47:21] Description: 
[31/10/2018 15:47:21] (luaDoCombat) Combat not found

Postado

function onCastSpell(cid, var)
local male = 350
local female = 351
local sex = getPlayerSex(cid)
if sex == 0 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then
doPlayerSetVocation(cid, 7)
setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1)
doCreatureChangeOutfit(cid, male)
elseif sex == 1 and getPlayerVocation(cid) == 3 and getPlayerStorageValue(cid, 17200) <= 0 then
doPlayerSetVocation(cid, 7)
setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) +1)

doCreatureChangeOutfit(cid, female)

else
doPlayerSendCancel(cid, "Você não é paladin ou já está com a magia ativada")
end
return true
end

Magia que cancela

function onCastSpell(cid, var)
local male = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local female = {lookType = 156, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}
local sex = getPlayerSex(cid)
if sex == 0 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then
doPlayerSetVocation(cid, 3)
setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1)
doCreatureChangeOutfit(cid, male)
elseif sex == 1 and getPlayerVocation(cid) == 7 and getPlayerStorageValue(cid, 17200) >= 1 then
doPlayerSetVocation(cid, 3)
setPlayerStorageValue(cid, getPlayerStorageValue(cid, 17200) -1)
doCreatureChangeOutfit(cid, female)
else
doPlayerSendCancel(cid, "Você não pode usar esta magia")
end
return true
end

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo