HeelNox 71 Postado Agosto 14, 2013 Share Postado Agosto 14, 2013 (editado) Gostaria de um script da seguinte forma Quando tal vocação usar tal comando muda-se a looktype e fica-se sem se mover , mais quando usar ele denovo volta-se a se mover e a looktype que estava antes Editado Agosto 14, 2013 por DarkHeel Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/ Compartilhar em outros sites More sharing options...
0 HeelNox 71 Postado Agosto 17, 2013 Autor Share Postado Agosto 17, 2013 Continua mesmo erro !!! Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551570 Compartilhar em outros sites More sharing options...
0 Roksas 846 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 (editado) Fiz um do início, vamos ver se funciona agora: function onSay(cid, words, param) local vocs = { [1] = 123, [2] = 231, [3] = 98, [4] = 76, } if not vocs[getPlayerVocation(cid)] then return true end if getPlayerStorageValue(cid, 9329) < 1 then doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 9329, 1) doSetCreatureOutfit(cid, vocs[getPlayerVocation(cid)], -1) elseif getPlayerStorageValue(cid, 9329) >= 1 then doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 9329, -1) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end Nesta parte, você tem que mudar: local vocs = { [1] = 123, [2] = 231, [3] = 98, [4] = 76, } Entre [ e ] é o ID da vocação e o número ao lado é o lookType. #GoodLuck. Editado Agosto 17, 2013 por Roksas Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551584 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 /\ falto fechar o if com um end ai fera xd Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551585 Compartilhar em outros sites More sharing options...
0 HeelNox 71 Postado Agosto 17, 2013 Autor Share Postado Agosto 17, 2013 (editado) Funcionou mais não ta trocando a looktype [17/08/2013 10:12:49] [Error - TalkAction Interface] [17/08/2013 10:12:49] data/talkactions/scripts/sit.lua:onSay [17/08/2013 10:12:49] Description: [17/08/2013 10:12:49] attempt to index a number value [17/08/2013 10:12:49] stack traceback: [17/08/2013 10:12:49] [C]: in function 'doSetCreatureOutfit' [17/08/2013 10:12:49] data/talkactions/scripts/sit.lua:16: in function <data/talkactions/scripts/sit.lua:1> Editado Agosto 17, 2013 por DarkHeel Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551602 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 vc mudou os ids ta looktype? Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551603 Compartilhar em outros sites More sharing options...
0 HeelNox 71 Postado Agosto 17, 2013 Autor Share Postado Agosto 17, 2013 vc mudou os ids ta looktype? Sim function onSay(cid, words, param) local vocs = { [1] = 538, [2] = 585, [3] = 536, } if not vocs[getPlayerVocation(cid)] then return true end if getPlayerStorageValue(cid, 9329) < 1 then doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 9329, 1) doSetCreatureOutfit(cid, vocs[getPlayerVocation(cid)], -1) elseif getPlayerStorageValue(cid, 9329) >= 1 then doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 9329, -1) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551605 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 (editado) ah eh pq o roksas não usou o parâmetro certo na função, tem que colocar {lookType} function onSay(cid, words, param) local vocs = { [1] = 538, [2] = 585, [3] = 536, } if not vocs[getPlayerVocation(cid)] then return true end if getPlayerStorageValue(cid, 9329) < 1 then doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 9329, 1) doSetCreatureOutfit(cid, {lookType = vocs[getPlayerVocation(cid)]}, -1) elseif getPlayerStorageValue(cid, 9329) >= 1 then doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 9329, -1) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end Editado Agosto 17, 2013 por Vodkart Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551607 Compartilhar em outros sites More sharing options...
0 Roksas 846 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 Ah perdão galera, me esqueci que é uma tabela outfits rsrs. {lookType, lookHead, lookBody, etc}. #GoodLuck! Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551609 Compartilhar em outros sites More sharing options...
0 HeelNox 71 Postado Agosto 17, 2013 Autor Share Postado Agosto 17, 2013 (editado) Vlw REP+ para os dois , mais teria como por para healar 5 de hp por segundo ? Editado Agosto 17, 2013 por DarkHeel Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551613 Compartilhar em outros sites More sharing options...
0 Roksas 846 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 #Perfect function onSay(cid, words, param) local hpGain = 5 local vocs = { [1] = 538, [2] = 585, [3] = 536, } if not vocs[getPlayerVocation(cid)] then return true end if getPlayerStorageValue(cid, 9329) < 1 then heal(cid, hpGain) doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 9329, 1) doSetCreatureOutfit(cid, {lookType = vocs[getPlayerVocation(cid)]}, -1) elseif getPlayerStorageValue(cid, 9329) >= 1 then doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 9329, -1) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end function heal(uid, hp) if not isPlayer(uid) then return true end if getPlayerStorageValue(uid, 9329) < 1 then return true end doCreatureAddHealth(uid, hp) return addEvent(heal, 1 * 1500, uid, hp) end Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551616 Compartilhar em outros sites More sharing options...
0 HeelNox 71 Postado Agosto 17, 2013 Autor Share Postado Agosto 17, 2013 #Perfect function onSay(cid, words, param) local hpGain = 5 local vocs = { [1] = 538, [2] = 585, [3] = 536, } if not vocs[getPlayerVocation(cid)] then return true end if getPlayerStorageValue(cid, 9329) < 1 then heal(cid, hpGain) doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 9329, 1) doSetCreatureOutfit(cid, {lookType = vocs[getPlayerVocation(cid)]}, -1) elseif getPlayerStorageValue(cid, 9329) >= 1 then doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 9329, -1) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end function heal(uid, hp) if not isPlayer(uid) then return true end if getPlayerStorageValue(uid, 9329) < 1 then return true end doCreatureAddHealth(uid, hp) return addEvent(heal, 1 * 1500, uid, hp) end Num ta healando D= Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551618 Compartilhar em outros sites More sharing options...
0 Roksas 846 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 Tente com um player, e tenha certeza de que sua vida não está cheia ¬¬ Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551619 Compartilhar em outros sites More sharing options...
0 Maenilse 86 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 tome esse. acho que ele eskeçeu de colocar o hpGain no ultimo rs. function onSay(cid, words, param) local hpGain = 5 local vocs = { [1] = 538, [2] = 585, [3] = 536, } if not vocs[getPlayerVocation(cid)] then return true end if getPlayerStorageValue(cid, 9329) < 1 then heal(cid, hpGain) doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 9329, 1) doSetCreatureOutfit(cid, {lookType = vocs[getPlayerVocation(cid)]}, -1) elseif getPlayerStorageValue(cid, 9329) >= 1 then doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 9329, -1) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end function heal(uid, hp) if not isPlayer(uid) then return true end if getPlayerStorageValue(uid, 9329) < 1 then return true end doCreatureAddHealth(uid, hpGain) return addEvent(heal, 1 * 1500, uid, hp) end Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551620 Compartilhar em outros sites More sharing options...
0 Slicer 1070 Postado Agosto 17, 2013 Share Postado Agosto 17, 2013 rok coloque a funçao heal(..., ...) embaixo do setStorageValue... se n nunca vai healar ms... ¬¬ Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551621 Compartilhar em outros sites More sharing options...
0 HeelNox 71 Postado Agosto 17, 2013 Autor Share Postado Agosto 17, 2013 (editado) tome esse. acho que ele eskeçeu de colocar o hpGain no ultimo rs. function onSay(cid, words, param) local hpGain = 5 local vocs = { [1] = 538, [2] = 585, [3] = 536, } if not vocs[getPlayerVocation(cid)] then return true end if getPlayerStorageValue(cid, 9329) < 1 then heal(cid, hpGain) doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, 9329, 1) doSetCreatureOutfit(cid, {lookType = vocs[getPlayerVocation(cid)]}, -1) elseif getPlayerStorageValue(cid, 9329) >= 1 then doCreatureSetNoMove(cid, false) setPlayerStorageValue(cid, 9329, -1) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end function heal(uid, hp) if not isPlayer(uid) then return true end if getPlayerStorageValue(uid, 9329) < 1 then return true end doCreatureAddHealth(uid, hpGain) return addEvent(heal, 1 * 1500, uid, hp) end Não funfou , estou com meu char player e não ta healando Editado Agosto 17, 2013 por DarkHeel Link para o comentário https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/page/2/#findComment-1551622 Compartilhar em outros sites More sharing options...
Pergunta
HeelNox 71
Gostaria de um script da seguinte forma
Quando tal vocação usar tal comando muda-se a looktype e fica-se sem se mover , mais quando usar ele denovo volta-se a se mover e a looktype que estava antes
Editado por DarkHeel
Link para o comentário
https://xtibia.com/forum/topic/219459-resolvido-trocar-looktype-e-ficar-sem-andar/Compartilhar em outros sites
Top Posters For This Question
14
10
4
4
Popular Days
Ago 17
20
Ago 16
14
Ago 14
1
Top Posters For This Question
HeelNox 14 posts
Roksas 10 posts
Vodkart 4 posts
Maenilse 4 posts
Popular Days
Ago 17 2013
20 posts
Ago 16 2013
14 posts
Ago 14 2013
1 post
Popular Posts
Vodkart
ah eh pq o roksas não usou o parâmetro certo na função, tem que colocar {lookType} function onSay(cid, words, param) local vocs = { [1] = 538, [2] = 585, [3] = 536, } if not vocs[getPlayerVocati
Roksas
Ah perdão galera, me esqueci que é uma tabela outfits rsrs. {lookType, lookHead, lookBody, etc}. #GoodLuck!
34 respostass a esta questão
Posts Recomendados