Ir para conteúdo

Featured Replies

Postado

@Joaovettor Cara, teria como fazer uma spell que quando o player usasse, ele mudaria de vocação e outfit por tempo indeterminado, e quando ele usasse uma outra spell, ele voltasse e também voltasse o outfit?? (se não tiver como voltar o outfit que tava, pode ser male um e female outro)

  • 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
2 horas atrás, Zazeros disse:

@Joaovettor Cara, teria como fazer uma spell que quando o player usasse, ele mudaria de vocação e outfit por tempo indeterminado, e quando ele usasse uma outra spell, ele voltasse e também voltasse o outfit?? (se não tiver como voltar o outfit que tava, pode ser male um e female 

function onCastSpell(cid, var)
local tempo = 1
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)
local voc = doPlayerSetVocation
if sex == 0 and getPlayerVocation(cid) == 3 then
addEvent(voc, 10*1000, cid, 7)
setPlayerStorageValue(cid, store, os.time()+exausted)
doSetCreatureOutfit(cid, male, tempo*1000) else if sex == 1 and getPlayerVocation(cid) == 3 then
addEvent(voc, 10*1000, cid, 7)
setPlayerStorageValue(cid, store, os.time()+exausted)
doSetCreatureOutfit(cid, female, tempo*1000)

end
return true
end

Editado por Joaovettor (veja o histórico de edições)

Postado
13 minutos atrás, Zazeros disse:

@Joaovettor Para que seja por tempo indeterminado, eu tiro essa linha? addEvent(voc, 10*1000, cid, 7)

 

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

Postado

@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 'ï'

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