Ir para conteúdo
Banner com Efeitos

jNo

Membro
  • Registro em

  • Última visita

Tudo que jNo postou

  1. Estou usando o seguinte script abaixo pro NPC bank, porém ele não funciona na parte deposita all e transfery, se alguém conseguir corrigir isso. Ou fazer um simples que apenas deposit all e deposit x quantia, withdraw, balance http://www.tibiaking.com/forum/topic/11454-npc-bank-igual-tibia-global/ local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --------------------MESSAGES------------------------------------------------------------------------------ if msgcontains(msg, 'deposit') then selfSay('Please tell me how much gold it is you would like to deposit.', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'withdraw') then selfSay('Please tell me how much gold you would like to withdraw.', cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'transfer') then selfSay('Please tell me the amount of gold coins you would like to transfer.', cid) talkState[talkUser] = 5 elseif msgcontains(msg, 'change gold') then selfSay('How many platinum coins do you want to get?', cid) talkState[talkUser] = 8 elseif msgcontains(msg, 'change platinum') then selfSay('Do you want to change your platinum coins to gold or crystal?', cid) talkState[talkUser] = 10 elseif msgcontains(msg, 'change crystal') then selfSay('How many crystal coins do you want to change to platinum?', cid) talkState[talkUser] = 15 elseif msgcontains(msg, 'balance') then n = getPlayerBalance(cid) selfSay('Your balance are '..n..' golds.', cid) talkState[talkUser] = 0 ----------------------DEPOSIT------------------------------------------------------- elseif talkState[talkUser] == 1 then if msgcontains(msg, 'all') then n = getPlayerMoney(cid) selfSay('Do you want deposit '..n..' golds ?', cid) talkState[talkUser] = 2 else n = getNumber(msg) selfSay('Do you want deposit '..n..' golds ?', cid) talkState[talkUser] = 2 end elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') then if getPlayerMoney(cid) >= n then doPlayerDepositMoney(cid,n) selfSay('Sucessfull. Now your balance account is ' ..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) end else selfSay('Ok then', cid) end ----------------------WITHDRAW------------------------------------------------------------------------------------- elseif talkState[talkUser] == 3 then if msgcontains(msg, 'all') then n = getPlayerBalance(cid) selfSay('Do you want withdraw '..n..' golds ?', cid) talkState[talkUser] = 4 else n = getNumber(msg) selfSay('Do you want withdraw '..n..' golds ?', cid) talkState[talkUser] = 4 end elseif talkState[talkUser] == 4 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= n then doPlayerWithdrawMoney(cid, n) selfSay('Here you are, '..n..' gold. Now your balance account is ' ..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('There is not enough gold on your account', cid) end else selfSay('Ok then', cid) end ----------------------TRANSFER---------------------------------------------------------------------------------------- elseif talkState[talkUser] == 5 then if msgcontains(msg, 'all') then n = getPlayerBalance(cid) selfSay('Who would you like transfer '..n..' gold to?', cid) talkState[talkUser] = 6 else n = getNumber(msg) selfSay('Who would you like transfer '..n..' gold to?', cid) talkState[talkUser] = 6 end elseif talkState[talkUser] == 6 then p = msg selfSay('So you would like to transfer '..n..' gold to '..p..'?', cid) talkState[talkUser] = 7 elseif talkState[talkUser] == 7 then if msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= n then if doPlayerTransferMoneyTo(cid, p, n) == TRUE then selfSay('You have transferred '..n..' gold to '..p..' and your account balance is '..getPlayerBalance(cid)..' golds.', cid) talkState[talkUser] = 0 else selfSay('This player does not exist. Please tell me a valid name!', cid) talkState[talkUser] = 0 end else selfSay('There is not enough gold on your account', cid) talkState[talkUser] = 0 end else selfSay('Ok then', cid) talkState[talkUser] = 0 end ----------------------CHANGE GOLD--------------------------------------------------------------------------------- elseif talkState[talkUser] == 8 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..b..' of your gold coins to '..n..' platinum coins for you?', cid) talkState[talkUser] = 9 elseif talkState[talkUser] == 9 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2148, b) == TRUE then doPlayerAddItem(cid, 2152, n) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end ---------------------CHANGE PLATINUM------------------------------------------------------------------------- elseif talkState[talkUser] == 10 then if msgcontains(msg, 'gold') then selfSay('How many platinum coins do you want to change to gold?', cid) talkState[talkUser] = 11 elseif msgcontains(msg, 'crystal') then selfSay('How many crystal coins do you want to get?', cid) talkState[talkUser] = 13 end elseif talkState[talkUser] == 11 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..n..' of your platinum coins to '..b..' gold coins for you?', cid) talkState[talkUser] = 12 elseif talkState[talkUser] == 12 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, n) == TRUE then doPlayerAddItem(cid, 2148, b) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end elseif talkState[talkUser] == 13 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..b..' of your platinum coins to '..n..' crystal coins for you?', cid) talkState[talkUser] = 14 elseif talkState[talkUser] == 14 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, b) == TRUE then doPlayerAddItem(cid, 2160, n) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end ---------------------CHANGE CRYSTAL------------------------------------------------------------------------------- elseif talkState[talkUser] == 15 then n = getNumber(msg) b = n * 100 selfSay('So I should change '..n..' of your crystal coins to '..b..' platinum coins for you?', cid) talkState[talkUser] = 16 elseif talkState[talkUser] == 16 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2160, n) == TRUE then doPlayerAddItem(cid, 2152, b) talkState[talkUser] = 0 else selfSay('You don\'t have money.', cid) talkState[talkUser] = 0 end else selfSay('Ok. We cancel.', cid) talkState[talkUser] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -- function maded by Gesior-- function getNumber(txt) --return number if its number and is > 0, else return 0 x = string.gsub(txt,"%a","") x = tonumber(x) if x ~= nill and x > 0 then return x else return 0 end end
  2. @Suicide funcionou, aos demais obrigado, rep para todos pela tentativa :3
  3. @Edit, deu certo, valeuuuuuu
  4. Então, tem esse sistema abaixo de adcionar acesso a vips, a primeira parte, parece funcionar, manda a mensagem e tudo, porém a parte do movements não esta pegando, chego no sqm, passo batido, não manda pro templo e nem nada se eu não tiver a storage do acesso, segue abaixo a configuração Actions function onUse(cid, item, frompos, item2, topos) if item.uid ==60008 then -- Aki e o uniqueid que fica no actions.xml sempre mude se for criar outra queststatus = getPlayerStorageValue(cid,7500) -- Aki Ponhe a mesma storage la de baixo if queststatus == 1 then doPlayerSendTextMessage(cid,22,"Você ja fez essa quest.") else doPlayerSendTextMessage(cid,22,"Agora você tem acesso a VIP 1.") doSendMagicEffect(topos,35) coins_uid = doPlayerAddItem(cid,2160,1000) -- Id do item que vai adicionar e a quantidade setPlayerStorageValue(cid,7500,1) -- Aki e A Storage da vip so mude aki se vo criar outra vip end return 0 end return 1 end <action uniqueid="60008" event="script" value="questvipacess/bausystemvip.lua"/> Movements function onStepIn(cid, item, pos) -- teleports config teleport1 ={x= 1020, y= 1022, z= 7} -- Aki e a pos pra onde ele vai voltar se nao tiver vip if isPlayer(cid) then if item.actionid == 7500 then -- Aki e akela storage que tinha no actions vip = getPlayerStorageValue(cid,7500) -- Aki Também e akela storage e voce poem ela aki if vip == -1 then doPlayerSendCancel(cid,"Você não é VIP 1, faça a quest VIP Acess ao lado do Teleports.") doTeleportThing(cid,teleport1) else end end end end <movevent type="StepIn" uniqueid="7500" event="script" value="questvipacess.lua"/>
  5. @Zipter98 deu esse erro no 1 script, no 2 nem pegou. @Carionte, no seu 1 script deu esse erro, também optarei por usar uniquesid diferente vai facilitar por aqui deu erro no distro de duplicate ID Estou usando assim o Action, coloquei uniqueid por uniqueid já nos bau. <action uniqueid="60002;60003;60004;60005;60006" event="script" value="questvipacess/bauweapons.lua"/>
  6. Nada, tem que ser também uma unica UNIQUEID, no caso 60002, essas outras eu uso em outras quest
  7. Sua alteração funcionou perfeitamente, vou te reputar, e aguardar pelo o pedido...
  8. Pera, vou explicar melhor: 5 báus SWORD AXE CLUB WAND CROSSBOW+ARROW Ai o jogador só pode escolher 1 bau dentre os 5, por exemplo, eu vou e clico no 5 bau, vem o crossbow e a arrow junto, ai se eu quiser clicar no demais, não funciona, diz que esta empty
  9. Preciso de uma action assim, tem 5 báu, o jogador vai ter que escolher dentre esses 5 apenas 1 item, e no 5 bau vai vir 2 item de uma vez, então preciso de um script que não permita o jogador pegar todos, apenas 1. Utilizando uniqueid no actions xml, ai eu coloco o mesmo uniqueid nos bau no rme E uma alteração no script abaixo, pro item não vir dentro da bag function onUse(cid, item, frompos, item2, topos) if item.uid == 60003 then if getPlayerStorageValue(cid,60003) == -1 then doPlayerSendTextMessage(cid,25,"You have found a item.") local bag = doPlayerAddItem(cid,1987,1) doAddContainerItem(bag,55571,1) setPlayerStorageValue(cid,60003,1) else doPlayerSendTextMessage(cid,25,"It is empty.") end end return true end id da bag 1987
  10. òtimo, deu certo + rep, só uma sugestão, tinha que por uma fala, por exemplo "Agora você esta iluminado full", sei lá
  11. O site ta fora do ar a dias, acho que ja era
  12. Vai no Global Events > Scripts E do chão, Movements > Scripts
  13. É mesmo cara, que fracasso que eu sou, nem notei isso :angry2:
  14. Esse script abaixo, ele funciona certinho, é o !removeskull, o problema é que o player usa a talk mesmo sem skull fica aparecendo a mensagem "Skull skull foi removida"... então a mudança nele tinha que ser pra funcionar se realmente estiver com red skull ou black skull --- skull remover by kakilo - quinto script function onSay(cid, words, param, channel) if (getCreatureSkullType(cid) == SKULL_BLACK) then if doPlayerRemoveMoney(cid, 2000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Você precisa de 2kk para remover a sua black skull") end end if (getCreatureSkullType(cid) == SKULL_RED) then if doPlayerRemoveMoney(cid, 1000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Você precisa de 1kk para remover a sua red skull") end end if (getCreatureSkullType(cid) == SKULL_NONE) then doPlayerSendTextMessage(cid, 22, "Sua Skull foi retirada com Sucesso!") end return TRUE end
  15. valeu bruxooooooo
  16. Desculpe amigo, esse sistema foi desenvolvido pelo Vodkart aqui do fórum, não me lembro se funcionava apenas em SQL, bom, o que você pode fazer é tira print do erro se tiver algum e criar um tópico no suporte de script/programação, provavel que alguém saiba resolver... ou você pode optar e por outro sistema. Vê se tem algum erro e cria la
  17. http://www.tibiaking.com/forum/topic/20824-como-fazer-para-paladin-poder-healar-em-quanto-ataca/ Olha para paladin atacar mesmo quando estiver healando! Abra Weapons.xml, e adicione essa tag em todas as Ammunitions de Paladin! swing="true" Vai ficar tipo: Antes: <distance id="7367" level="42" event="function" value="default"/> Depois: <distance id="7367" level="42" swing="true" event="function" value="default"/> Créditos do God Myth
  18. Fala o que pra um fera desse? Valeu caraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, ajudou muito :3
  19. Tem sim, não cheguei a por, você sabe fazer né? Qualquer coisa tem ai no fórum, só por nas armas das quest e donate, unicas que utilizam
  20. VIP dois é quest, adquirindo o vip stone, o restante também é quest pra dar vip donate não tem comando, é points, da points e o jogador vai e clica no bau na sala donate /addpoints Fulano, 100
  21. Funcionou os 2 perfeitamente, muito obrigado, esta ajudando muito! +rep
  22. Deve ser apenas contigo amigo, tente trocar o local do treiner, por exemplo vai no das VIPS, e faz o teste. Acho que seu pc não aguenta as magias saindo rapidamente, e post aqui
  23. Essa parte do treino off, ao em vez de aparecer a mensagem na tela pra da ok, aparecer no defaut em vermelho < "VOCÊ AINDA TEM..... DE TREINO OFF" -- 0.4 - offline training - login.lua function onLogin(cid) OfflineTraining_initialize(cid) if(OfflineTraining_isTraining(cid)) then OfflineTraining_turnOffTraining(cid) -- we add skill/mlvl, we select lower value: time that player was offline OR offline training time [bar in game - 9.6] OfflineTraining_addTrainedSkills(cid, math.min(OfflineTraining_getTime(cid), OfflineTraining_getOfflineTime(cid))) -- we remove offline training time [bar in game - 9.6], -- if player was offline longer then his 'offline training time' it will add him time [like on RL tibia] -- got '3 hours offline training time', stay logged off for 8 hours, you get skills for 3 hours and on login you got '5 hours offline training time' OfflineTraining_setTime(cid, math.abs(OfflineTraining_getTime(cid) - OfflineTraining_getOfflineTime(cid))) OfflineTraining_onEndTraining(cid) local left = ((OfflineTraining_getTime(cid) / 60) * 60 * 60) left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)} doPlayerPopupFYI(cid, 'Voce ainda tem '.. left.hour ..'h and '..left.minutes..'min de Treinamento.') else -- offline training time also regenerate when you are offline, but NOT train local lefts = ((OfflineTraining_getTime(cid) / 60) * 60 * 60) OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + OfflineTraining_getOfflineTime(cid)) lefts = {hour = math.floor(lefts/3600), minutes = math.ceil((lefts % 3600)/60)} doPlayerPopupFYI(cid, 'Voce tem '.. lefts.hour ..'h and '..lefts.minutes..'min de Treinamento.') end return true end
  24. jNo postou uma resposta no tópico em Playground (Off-topic)
    Feliz Ano novo Welcomido
  25. Lembrei que o Vodkart havia feito pra min, como meus tópicos foram apagados, não sei como... lembrei que tinha a solução em um bloco de notas no meu pen drive iuasdhuiashdiuai, ele fez uma função ai pra lib diferente: Não ponham apenas essa parte abaixo na lib 50 se estiver com problema parecido: function setFrags(cid) if not isCreature(cid) then return LUA_ERROR end setPlayerStorageValue(cid, 824544, getPlayerFrags(cid)) return doPlayerSave(cid) end Coloque assim \/ function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)} return size.day + size.week + size.month end function setFrags(cid) if not isCreature(cid) then return LUA_ERROR end setPlayerStorageValue(cid, 824544, getPlayerFrags(cid)) return doPlayerSave(cid) end

Informação Importante

Confirmação de Termo