Ir para conteúdo
  • 0

Ajuda com SCRIPT de QUEST


julhinhuu

Pergunta

7 respostass a esta questão

Posts Recomendados

  • 0


function onUse(cid, item, frompos, item2, topos)

voc = getPlayerVocation(cid)

pos = getPlayerPosition(cid)

add = 5

if voc == 5 or voc == 6 or voc == 12 then

stor = getPlayerStorageValue(cid,2357)

if stor == -1 then

setPlayerStorageValue(cid,2357,1)

doPlayerSetMagic(cid, getPlayerMagLevel(cid)+add)

doSendMagicEffect(frompos, 28)

doSendAnimatedText(pos, "Magic Up", TEXTCOLOR_BLUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

elseif voc == 7 then

stor = getPlayerStorageValue(cid,2357)

if stor == -1 then

setPlayerStorageValue(cid,2357,1)

doPlayerSetSkill(cid, SKILL_DISTANCE, getPlayerSkillLevel(cid, SKILL_DISTANCE)+12)

doSendMagicEffect(frompos, 28)

doSendAnimatedText(pos, "Distance Up", TEXTCOLOR_BLUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

elseif voc == 10 then

stor = getPlayerStorageValue(cid,2357)

if stor == -1 then

setPlayerStorageValue(cid,2357,1)

doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+12)

doPlayerSetSkill(cid, SKILL_SHIELDING, getPlayerSkillLevel(cid, SKILL_SHIELDING)+12)

doSendMagicEffect(frompos, 28)

doSendAnimatedText(pos, "Club Up", TEXTCOLOR_BLUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

elseif voc == 8 then

stor = getPlayerStorageValue(cid,2357)

if stor == -1 then

setPlayerStorageValue(cid,2357,1)

doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+12)

doPlayerSetSkill(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD)+12)

doPlayerSetSkill(cid, SKILL_AXE, getPlayerSkillLevel(cid, SKILL_AXE)+12)

doPlayerSetSkill(cid, SKILL_SHIELDING, getPlayerSkillLevel(cid, SKILL_SHIELDING)+12)

doSendMagicEffect(frompos, 28)

doSendAnimatedText(pos, "Skills Up", TEXTCOLOR_BLUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao tem a vocacao necessaria.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

return true

end

 

Editado por MudrocK
Link para o comentário
Compartilhar em outros sites

  • 0
function onUse(cid, item, frompos, item2, topos)
voc = getPlayerVocation(cid)
pos = getPlayerPosition(cid)
add = 5
if voc == 5 or voc == 6 or voc == 12 then
stor = getPlayerStorageValue(cid,2357)
if stor == -1 then
setPlayerStorageValue(cid,2357,1)
doPlayerSetMagic(cid, getPlayerMagLevel(cid)+add)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Magic Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 7 then
stor = getPlayerStorageValue(cid,2357)
if stor == -1 then
setPlayerStorageValue(cid,2357,1)
doPlayerSetSkill(cid, SKILL_DISTANCE, getPlayerSkillLevel(cid, SKILL_DISTANCE)+12)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Distance Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 10 then
stor = getPlayerStorageValue(cid,2357)
if stor == -1 then
setPlayerStorageValue(cid,2357,1)
doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+12)
doPlayerSetSkill(cid, SKILL_SHIELDING, getPlayerSkillLevel(cid, SKILL_SHIELDING)+12)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Club Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 8 then
stor = getPlayerStorageValue(cid,2357)
if stor == -1 then
setPlayerStorageValue(cid,2357,1)
doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+12)
doPlayerSetSkill(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD)+12)
doPlayerSetSkill(cid, SKILL_AXE, getPlayerSkillLevel(cid, SKILL_AXE)+12)
doPlayerSetSkill(cid, SKILL_SHIELDING, getPlayerSkillLevel(cid, SKILL_SHIELDING)+12)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Skills Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao tem a vocacao necessaria.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return true
end

Mesmo erro MudrocK..

 

[31/08/2015 23:48:32] [Error - Action Interface]

[31/08/2015 23:48:32] data/actions/scripts/Fully/Novas Quests/skills.lua:onUse

[31/08/2015 23:48:32] Description:

[31/08/2015 23:48:32] data/actions/scriptsFully/Novas Quests/skills.lua:31: attempt to call global 'doPlayerSetSkill' (a nil value)

[31/08/2015 23:48:32] stack traceback:

[31/08/2015 23:48:32] data/actions/scripts/Fully/Novas Quests/skills.lua:31: in function <data/actions/scripts/Fully/Novas Quests/skills.lua:1>

 

 

Na linha 8 onde está

 

 

Troque por:

 

 

 

Ele adiciona apenas porcentagens em Skills magic... Gostaria que adicionassem 5 de uma só vez.

Link para o comentário
Compartilhar em outros sites

  • 0


function onUse(cid, item, frompos, item2, topos)

voc = getPlayerVocation(cid)

pos = getPlayerPosition(cid)

add = 5

if voc == 5 or voc == 6 or voc == 12 then

stor = getPlayerStorageValue(cid,2357)

if stor == -1 then

setPlayerStorageValue(cid,2357,1)

doPlayerSetMagic(cid, getPlayerMagLevel(cid)+add)

doSendMagicEffect(frompos, 28)

doSendAnimatedText(pos, "Magic Up", TEXTCOLOR_BLUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

elseif voc == 7 then

stor = getPlayerStorageValue(cid,2357)

if stor == -1 then

setPlayerStorageValue(cid,2357,1)

doPlayerSetSkill(cid, SKILL_DISTANCE, getPlayerSkillLevel(cid, SKILL_DISTANCE)+12)

doSendMagicEffect(frompos, 28)

doSendAnimatedText(pos, "Distance Up", TEXTCOLOR_BLUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

elseif voc == 10 then

stor = getPlayerStorageValue(cid,2357)

if stor == -1 then

setPlayerStorageValue(cid,2357,1)

getPlayerSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+12)

getPlayerSkill(cid, SKILL_SHIELDING, getPlayerSkillLevel(cid, SKILL_SHIELDING)+12)

doSendMagicEffect(frompos, 28)

doSendAnimatedText(pos, "Club Up", TEXTCOLOR_BLUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

elseif voc == 8 then

stor = getPlayerStorageValue(cid,2357)

if stor == -1 then

setPlayerStorageValue(cid,2357,1)

doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+12)

doPlayerSetSkill(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD)+12)

doPlayerSetSkill(cid, SKILL_AXE, getPlayerSkillLevel(cid, SKILL_AXE)+12)

doPlayerSetSkill(cid, SKILL_SHIELDING, getPlayerSkillLevel(cid, SKILL_SHIELDING)+12)

doSendMagicEffect(frompos, 28)

doSendAnimatedText(pos, "Skills Up", TEXTCOLOR_BLUE)

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao tem a vocacao necessaria.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

return true

end

 

Editado por MudrocK
Link para o comentário
Compartilhar em outros sites

  • 0
function onUse(cid, item, frompos, item2, topos)
voc = getPlayerVocation(cid)
pos = getPlayerPosition(cid)
add = 5
if voc == 5 or voc == 6 or voc == 12 then
stor = getPlayerStorageValue(cid,2357)
if stor == -1 then
setPlayerStorageValue(cid,2357,1)
doPlayerSetMagic(cid, getPlayerMagLevel(cid)+add)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Magic Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 7 then
stor = getPlayerStorageValue(cid,2357)
if stor == -1 then
setPlayerStorageValue(cid,2357,1)
doPlayerSetSkill(cid, SKILL_DISTANCE, getPlayerSkillLevel(cid, SKILL_DISTANCE)+12)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Distance Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 10 then
stor = getPlayerStorageValue(cid,2357)
if stor == -1 then
setPlayerStorageValue(cid,2357,1)
getPlayerSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+12)
getPlayerSkill(cid, SKILL_SHIELDING, getPlayerSkillLevel(cid, SKILL_SHIELDING)+12)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Club Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif voc == 8 then
stor = getPlayerStorageValue(cid,2357)
if stor == -1 then
setPlayerStorageValue(cid,2357,1)
doPlayerSetSkill(cid, SKILL_CLUB, getPlayerSkillLevel(cid, SKILL_CLUB)+12)
doPlayerSetSkill(cid, SKILL_SWORD, getPlayerSkillLevel(cid, SKILL_SWORD)+12)
doPlayerSetSkill(cid, SKILL_AXE, getPlayerSkillLevel(cid, SKILL_AXE)+12)
doPlayerSetSkill(cid, SKILL_SHIELDING, getPlayerSkillLevel(cid, SKILL_SHIELDING)+12)
doSendMagicEffect(frompos, 28)
doSendAnimatedText(pos, "Skills Up", TEXTCOLOR_BLUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce ja fez a quest.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao tem a vocacao necessaria.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return true
end

 

Nada ainda, mesmo erro.

@MudrocK - Obrigado por tentar ajudar sz

@Jvcasarin - Obrigado tambem por tentar ajudar sz

 

Agradeço também ao Xtibia que tem pessoas humildes tongue.pngbeurk.gif

Editado por julhinhokullitz
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...