iurygoncalves 0 Postado Julho 7, 2010 Share Postado Julho 7, 2010 Estou fazendo esse código, mas não consegui fazê-lo funcionar. Peço a ajuda de você para analizar o script e ver onde está o erro. function onLogin(cid) local speed = 300 local speed2 = 600 local speed3 = 900 if getPlayerStorageValue(cid, 5555) == 0 then doChangeSpeed(cid, speed) elseif getPlayerStorageValue(cid, 5555) == 1 then doChangeSpeed(cid, speed2) elseif getPlayerStorageValue(cid, 5555) == 2 then doChangeSpeed(cid, speed3) else end end Obrigado a todos. Link para o comentário https://xtibia.com/forum/topic/136696-creaturescript-evento-onlogin-que-d%C3%A1-o-player-uma-determinada-velocide-de-acordo-com-a-storage/ Compartilhar em outros sites More sharing options...
Oneshot 732 Postado Julho 7, 2010 Share Postado Julho 7, 2010 iurygoncalves, Qual o erro que está ocorrendo? Link para o comentário https://xtibia.com/forum/topic/136696-creaturescript-evento-onlogin-que-d%C3%A1-o-player-uma-determinada-velocide-de-acordo-com-a-storage/#findComment-903116 Compartilhar em outros sites More sharing options...
iurygoncalves 0 Postado Julho 7, 2010 Autor Share Postado Julho 7, 2010 Dá conflito e os chares não entram no ot .. abre a lista de Characters, você seleciona e ele fica como se tivesse entrando, mas não entra. Link para o comentário https://xtibia.com/forum/topic/136696-creaturescript-evento-onlogin-que-d%C3%A1-o-player-uma-determinada-velocide-de-acordo-com-a-storage/#findComment-903152 Compartilhar em outros sites More sharing options...
Oneshot 732 Postado Julho 8, 2010 Share Postado Julho 8, 2010 iurygoncalves, Como isso é uma função usada em creaturescripts, Você certificou-se de registrar esse evento no arquivo login.lua* e em creaturescripts.xml? E retire aquele else * - '/creaturescripts/scripts' registerCreatureEvent(cid, "Mesmo nome dado em creaturescripts.xml") Cya Link para o comentário https://xtibia.com/forum/topic/136696-creaturescript-evento-onlogin-que-d%C3%A1-o-player-uma-determinada-velocide-de-acordo-com-a-storage/#findComment-903274 Compartilhar em outros sites More sharing options...
Wiltry 7 Postado Julho 26, 2010 Share Postado Julho 26, 2010 Na verdade, faltou o return TRUE '-' function onLogin(cid) local speed = 300 local speed2 = 600 local speed3 = 900 if getPlayerStorageValue(cid, 5555) == 0 then doChangeSpeed(cid, speed) elseif getPlayerStorageValue(cid, 5555) == 1 then doChangeSpeed(cid, speed2) elseif getPlayerStorageValue(cid, 5555) == 2 then doChangeSpeed(cid, speed3) else end return TRUE end Link para o comentário https://xtibia.com/forum/topic/136696-creaturescript-evento-onlogin-que-d%C3%A1-o-player-uma-determinada-velocide-de-acordo-com-a-storage/#findComment-912172 Compartilhar em outros sites More sharing options...
marcelo1025 9 Postado Julho 26, 2010 Share Postado Julho 26, 2010 Num entendi nada pod explicar melhor Link para o comentário https://xtibia.com/forum/topic/136696-creaturescript-evento-onlogin-que-d%C3%A1-o-player-uma-determinada-velocide-de-acordo-com-a-storage/#findComment-912224 Compartilhar em outros sites More sharing options...
Posts Recomendados