Postado Outubro 14, 2015 9 anos Boa noite,Gostaria de ajuda no seguinte script npc reborn 8.6 está dando erro na Lib na hora de rebornar...olhei alguns foruns e tentei mudar de db.executequery para db.query e nao mudou. Mostrar conteúdo oculto 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 TRUEendlocal focus = 0local talk_start = 0local target = 0local following = falselocal attacking = falsefunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos) if focus == cid then selfSay('?????.') focus = 0 talk_start = 0 endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then if getPlayerLevel(cid) >= 2001 thenselfSay('You cannot reborn, levels 2000 more not is possible.')return falseend 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) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 1 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 10, 211)talk_state = 0--Vegeta-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 8 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 26, 221) talk_state = 0--Piccolo-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 92 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 38, 231) talk_state = 0--C17-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 20 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 46, 241) talk_state = 0--Gohan-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 25 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 64, 251) talk_state = 0--Mirai Trunks-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 32 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 74, 261) talk_state = 0--Cell-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 38 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 81, 271) talk_state = 0--Freeza-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 43 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 88, 281) talk_state = 0--Buu-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 50 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 98, 291) talk_state = 0--Broly-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 57 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 113, 301) talk_state = 0--C18-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 62 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 46, 311) talk_state = 0--Uub-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 67 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 128, 321) talk_state = 0--Goten-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 72 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 142, 331) talk_state = 0--Chibi Trunks-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 79 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 151, 597) talk_state = 0--Cooler-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 86 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 153, 351) talk_state = 0--Dende-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 92 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 169, 361) talk_state = 0--Baby-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 97 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 580, 371) talk_state = 0--Bardock-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 102 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 188, 381) talk_state = 0--Kuririn-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 108 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 205, 391) talk_state = 0--Pan-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 113 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 212, 401) talk_state = 0--Videl-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 118 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 227, 411) talk_state = 0--Janemba--- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 123 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 234, 421) talk_state = 0--Tenshihan-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 128 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 246, 431) talk_state = 0--Jenk-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 133 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 257, 441) talk_state = 0--Raditz-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 138 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 267, 451) talk_state = 0--C16-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 143 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 272, 461) talk_state = 0--Turles-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 148 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 285, 471) talk_state = 0--Bulma-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 153 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 296, 481) talk_state = 0--Shenron-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 158 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 302, 491) talk_state = 0--Vegetto-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 163 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 308, 501) talk_state = 0--Tapion-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 168 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 321, 511) talk_state = 0--Kame-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 173 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 331, 521) talk_state = 0--Kagome-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 178 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 357, 531) talk_state = 0--King Vegeta-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 183 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 347, 541) talk_state = 0--Zaiko-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 188 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 368, 551) talk_state = 0--Chilled--- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 193 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 375, 561) talk_state = 0-C8-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 198 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 516, 571) talk_state = 0--Bills-- elseif msgcontains(msg, 'yes') and talk_state == 2 and getPlayerLevel(cid) <= 604 and getPlayerLevel(cid) >= 250 and getPlayerVocation(cid) == 203 thensetPlayerStorageValue(cid,30023,1) doReborn(cid, 1, 586, 581) talk_state = 0elseif msgcontains(msg, 'yes') and talk_state == 2 thenselfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform.') elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye.') focus = 0 talk_start = 0 end endendfunction 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 endend Se puderem me ajudar agradeço.
Postado Outubro 14, 2015 9 anos Autor Em 14/10/2015 em 00:39, MaTTch disse: db.query e não db.Query puts, que erro inutil meu, cara muito obrigado!vou ali me matar!-- Favor Solucionar o chamado.
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.