Postado Setembro 26, 2014 10 anos Autor para funcionar o script dele ele tem que pegar na lib essa função doReborn foi criada na lib dele o npc so funciona se tiver essa função da lib dele. procurei na net não sei bem se vc vai saber configurar mais e so por ela na sua lib. nesse lib/050-function function doReborn(cid, level, looktype, vocation) db.executeQuery("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") db.executeQuery("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") db.executeQuery("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") doRemoveCreature(cid) return TRUE end Adicionei certinho, porém ainda assim quando eu digo "yes" para rebornar ocorre o seguinte erro: http://prntscr.com/4qdl5e ~~ EDIT ~~ Creio que o erro se encontra nesse "db.executeQuery" então alterei para "db.query" e não da erro, porém só faz o char deslogar e nada acontece, não reseta, nem da vocação nem nada rsrs... Editado Setembro 26, 2014 10 anos por bhelliip (veja o histórico de edições)
Postado Setembro 26, 2014 10 anos Solução ve ae lek local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('?????.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Hello. If you ready I can "Reborn" you.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! Hey!.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then selfSay('Sorry, but you are after reborn.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30023) ~= 4 then selfSay('Hehe, I say If you READY. You do not have 250 lvl.') elseif msgcontains(msg, 'reborn') then selfSay('Are you sure?') talk_state = 2 --_GOKU_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 1 then doReborn(cid,1,152,109) talk_state = 0 --_VEGETA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 7 then doReborn(cid,1,129,118) talk_state = 0 --_GOHAN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 13 then doReborn(cid,1,147,127) talk_state = 0 --_TRUNKS_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 19 then doReborn(cid,1,131,136) talk_state = 0 --_CELL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 25 then doReborn(cid,1,127,145) talk_state = 0 --_FREEZA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 31 then doReborn(cid,1,9,154) talk_state = 0 --_UUB_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 37 then doReborn(cid,1,233,163) talk_state = 0 --_C17_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 43 then doReborn(cid,1,100,172) talk_state = 0 --_C18_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 49 then doReborn(cid,1,292,181) talk_state = 0 --_PICOLLO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 55 then doReborn(cid,1,262,190) talk_state = 0 --_DENDE_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 61 then doReborn(cid,1,225,199) talk_state = 0 --_TSUFUL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 67 then doReborn(cid,1,81,208) talk_state = 0 --_BARDOCK_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 73 then doReborn(cid,1,319,217) talk_state = 0 --_BROLLY_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 79 then doReborn(cid,1,263,226) talk_state = 0 --_C16_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 85 then doReborn(cid,1,301,235) talk_state = 0 --_COOLER_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 91 then doReborn(cid,1,242,244) talk_state = 0 --_JANEMBA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 97 then doReborn(cid,1,551,253) talk_state = 0 --_TAPION_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 103 then doReborn(cid,1,577,262) talk_state = 0 elseif msgcontains(msg, 'yes') and talk_state == 2 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert.') elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye.') focus = 0 talk_start = 0 end end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end function doReborn(cid, level, looktype, vocation) setGlobalStorageValue(1000,getPlayerGUID(cid)) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") db.executeQuery("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") db.executeQuery("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") return TRUE end tenta ae peguei de 1 site ja pronto se não der vo olhar serio e vo fazer ele do 0.. Meus topicos.[Gesior]Layout pokemon vrs1.0[854]OtServer Digimon Vrs.1.1 Spoiler http://free.timeanddate.com/countdown/i48ub0vi/n213/cf11/cm0/cu4/ct0/cs0/ca0/cr0/ss0/cac009/cpc000/pcf90/tcfff/fs100/szw448/szh189/tatTempo%20Para%20Resetar/tac000/tptDigimon%20World%20Cerberus%20Online/tpc000/matDigimon%20World%20Cerberus%20Online/mac000/mptEstá%20Online%20à/mpc000/iso2014-07-19T00:01:00/bas3/bat8/bac00f/pa3 Meu Servidor Digimon World Cerberus OnlineDigimon World Cerberus Online Agradecer sempre a todos que ajudaram, o server a ficar pronto deis de Sprites que não conheço,scripts, etc....como o jogo esta na internet e para todos usarem vlw a todos bjus...
Postado Setembro 26, 2014 10 anos Autor ve ae lek local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('?????.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then selfSay('Hello. If you ready I can "Reborn" you.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! Hey!.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'reborn') and getPlayerStorageValue(cid,30023) == 4 then selfSay('Sorry, but you are after reborn.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'reborn') and getPlayerLevel(cid) < 250 and getPlayerStorageValue(cid,30023) ~= 4 then selfSay('Hehe, I say If you READY. You do not have 250 lvl.') elseif msgcontains(msg, 'reborn') then selfSay('Are you sure?') talk_state = 2 --_GOKU_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 1 then doReborn(cid,1,152,109) talk_state = 0 --_VEGETA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 7 then doReborn(cid,1,129,118) talk_state = 0 --_GOHAN_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 13 then doReborn(cid,1,147,127) talk_state = 0 --_TRUNKS_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 19 then doReborn(cid,1,131,136) talk_state = 0 --_CELL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 25 then doReborn(cid,1,127,145) talk_state = 0 --_FREEZA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 31 then doReborn(cid,1,9,154) talk_state = 0 --_UUB_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 37 then doReborn(cid,1,233,163) talk_state = 0 --_C17_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 43 then doReborn(cid,1,100,172) talk_state = 0 --_C18_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 49 then doReborn(cid,1,292,181) talk_state = 0 --_PICOLLO_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 55 then doReborn(cid,1,262,190) talk_state = 0 --_DENDE_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 61 then doReborn(cid,1,225,199) talk_state = 0 --_TSUFUL_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 67 then doReborn(cid,1,81,208) talk_state = 0 --_BARDOCK_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 73 then doReborn(cid,1,319,217) talk_state = 0 --_BROLLY_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 79 then doReborn(cid,1,263,226) talk_state = 0 --_C16_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 85 then doReborn(cid,1,301,235) talk_state = 0 --_COOLER_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 91 then doReborn(cid,1,242,244) talk_state = 0 --_JANEMBA_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 97 then doReborn(cid,1,551,253) talk_state = 0 --_TAPION_-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) >= 250 and getPlayerLevel(cid) <= 1400 and getPlayerVocation(cid) == 103 then doReborn(cid,1,577,262) talk_state = 0 elseif msgcontains(msg, 'yes') and talk_state == 2 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert.') elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye.') focus = 0 talk_start = 0 end end end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 45 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end end end function doReborn(cid, level, looktype, vocation) setGlobalStorageValue(1000,getPlayerGUID(cid)) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") db.executeQuery("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") db.executeQuery("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. getGlobalStorageValue(1000) .. ";") return TRUE end tenta ae peguei de 1 site ja pronto se não der vo olhar serio e vo fazer ele do 0.. FUNCIONOOOUUU CARAAA! MUIITO OBRIGADOOO VEYY! Nem to acreditando rsrs a única coisa que eu tive que mudar foi esse comando "db.executeQuery" para "db.query" fora isso funcionou perfeitamente! REP +++++
Postado Setembro 26, 2014 10 anos se resolveu ta blz então xd.. so reportar para fecharem xD. Meus topicos.[Gesior]Layout pokemon vrs1.0[854]OtServer Digimon Vrs.1.1 Spoiler http://free.timeanddate.com/countdown/i48ub0vi/n213/cf11/cm0/cu4/ct0/cs0/ca0/cr0/ss0/cac009/cpc000/pcf90/tcfff/fs100/szw448/szh189/tatTempo%20Para%20Resetar/tac000/tptDigimon%20World%20Cerberus%20Online/tpc000/matDigimon%20World%20Cerberus%20Online/mac000/mptEstá%20Online%20à/mpc000/iso2014-07-19T00:01:00/bas3/bat8/bac00f/pa3 Meu Servidor Digimon World Cerberus OnlineDigimon World Cerberus Online Agradecer sempre a todos que ajudaram, o server a ficar pronto deis de Sprites que não conheço,scripts, etc....como o jogo esta na internet e para todos usarem vlw a todos bjus...
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.