Ir para conteúdo

osa68

Campones
  • Total de itens

    8
  • Registro em

  • Última visita

Sobre osa68

Informações

  • Forma que conheci o xTibia
    Otservs
  • Sou
    Scripter

osa68's Achievements

  1. 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 function sellPokemon(cid, name, price) -- n sei de quem é essa funçao local pokename = name local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) local itemsball = getItemsInContainerById(bp.uid, 2222) local itemsultra = getItemsInContainerById(bp.uid, 2220) for _, pok in pairs(itemsball) do if string.lower(getItemAttribute(pok, "poke"):sub(9, findLetter(getItemAttribute(pok, "poke"), "'")-1)) == pokename then doRemoveItem(pok, 1) doPlayerAddMoney(cid, price) selfSay("Wow! Thanks for this wonderful pokemon! Take your money.",cid) return true end break end for _, pok in pairs(itemsultra) do if string.lower(getItemAttribute(pok, "poke"):sub(9, findLetter(getItemAttribute(pok, "poke"), "'")-1)) == pokename then doRemoveItem(pok, 1) doPlayerAddMoney(cid, price) selfSay("Wow! Thanks for this wonderful pokemon! Take your money.",cid) return true end break end selfSay("Hey, you dont have this pokemon("..pokename..")! Make sure if its not fainted and it is inside your backpack!",cid) end local pokemons = { ["gloom"] = {price = 150000}, ["kakuna"] = {price = 25000}, ["sandshrew"] = {price = 85000}, ["pidgeot"] = {price = 550000}, ["rattata"] = {price = 130000}, ["pidgeotto"] = {price = 120000}, ["poliwag"] = {price = 11000}, ["horsea"] = {price = 20000}, ["oddish"] = {price = 8000}, ["bellsprout"] = {price = 10000}, ["pidgey"] = {price = 5000}, ["beedrill"] = {price = 120000}, ["magnemite"] = {price = 60000}, ["magneton"] = {price = 250000}, ["raticate"] = {price = 85000}, ["seadra"] = {price = 250000}, ["doduo"] = {price = 65000}, ["dodrio"] = {price = 300000}, ["golbat"] = {price = 120000}, ["graveler"] = {price = 160000}, ["electrode"] = {price = 200000}, ["victreebel"] = {price = 500000}, ["poliwhirl"] = {price = 220000}, ["bulbasaur"] = {price = 300000} } if(msgcontains(msg, "pokemon") or msgcontains(msg, "pokemon")) then local str = "" str = str .. "Pokemon Prices :\n\n" for name, pos in pairs(Pokemons) do str = str..name.." = "..pos.price.."\n" end str = str .. "" doShowTextDialog(cid, 6579, str) selfSay("has some pokemon you want sell me?", cid) talkState[talkUser] = 1 elseif pokemons[msg] and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, 25000) == 5 then return selfSay("Voce está montando.",cid) elseif getPlayerStorageValue(cid, 23000) == 5 then return selfSay("Voce está voando.",cid) elseif #getCreatureSummons(cid) >= 1 then return selfSay("Voce precisa botar seus pokemons dentro da pokebola.",cid) end sellPokemon(cid, msg, pokemons[msg].price) elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) [07/02/2011 13:24:50] [Error - Npc interface] [07/02/2011 13:24:50] data/npc/scripts/pokemon.lua:onCreatureSay [07/02/2011 13:24:50] Description: [07/02/2011 13:24:50] data/npc/scripts/pokemon.lua:73: bad argument #1 to 'pairs' (table expected, got nil) [07/02/2011 13:24:50] stack traceback: [07/02/2011 13:24:50] [C]: in function 'pairs' [07/02/2011 13:24:50] data/npc/scripts/pokemon.lua:73: in function 'callback' [07/02/2011 13:24:50] data/npc/lib/npcsystem/npchandler.lua:390: in function 'onCreatureSay' [07/02/2011 13:24:50] data/npc/scripts/pokemon.lua:8: in function <data/npc/scripts/pokemon.lua:8>
  2. [06/02/2011 23:29:04] [Error - Npc interface] [06/02/2011 23:29:04] data/npc/scripts/buypoks.lua:onCreatureSay [06/02/2011 23:29:04] Description: [06/02/2011 23:29:04] data/npc/scripts/buypoks.lua:74: bad argument #1 to 'pairs' (table expected, got nil) [06/02/2011 23:29:04] stack traceback: [06/02/2011 23:29:04] [C]: in function 'pairs' [06/02/2011 23:29:04] data/npc/scripts/buypoks.lua:74: in function 'callback' [06/02/2011 23:29:04] data/npc/lib/npcsystem/npchandler.lua:390: in function 'onCreatureSay' [06/02/2011 23:29:04] data/npc/scripts/buypoks.lua:8: in function <data/npc/scripts/buypoks.lua:8> v2 ? not work
  3. Could give script to pokemon attack m1,m2,m3 ?. Poderia dar um script para atacar pokemon m1,m2,m3 ?.
  4. Npc Healler By: MatheusMkalo Vá em data/npc/scripts e adicione um arquivo.lua com o nome de pokehealer.lua Depois adicione o seguinte script dentro dele: 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 if msgcontainsalocal pokes = { ["Dragon"] = {corpseid = 5973, chance = 100, health = 12200, maxhealth = 12200}, ["Dragon Lord"] = {corpseid = 5984, chance = 100, health = 12200, maxhealth = 12200}, ["Demon"] = {corpseid = 5995, chance = 100, health = 12200, maxhealth = 12200}, } local time = 4 -- Tempo para mandar as mensagens e adiciona item function onUse(cid, item, frompos, item2, topos) for i,x in pairs(pokes) do if item2.itemid == x.corpseid then doRemoveItem(item.uid, 1) doRemoveItem(item2.uid, 1) if math.random(1,100) <= x.chance then function add() local s = doPlayerAddItem(cid, pokein) doItemSetAttribute(s, "poke", "This is "..i.."'s pokeball. HP = ["..x.health.."/"..x.maxhealth.."]") doItemSetAttribute(s, "description", "Contains a " .. i) end doSendMagicEffect(topos, 24) addEvent(add, time*1000) return addEvent(doPlayerSendTextMessage, time*1000, cid, 27, "You catch a " .. i .. ".") else addEvent(doPlayerSendTextMessage, time*1000, cid, 27, "Your pokeball broke.") return doSendMagicEffect(topos, 23) end end end return TRUE end dont work ;] local pokes = { ["Bulbasaur"] = {corpseid = 5966, chance = 10, health = 12200, maxhealth = 12200}, ["Dragon Lord"] = {corpseid = 5984, chance = 100, health = 12200, maxhealth = 12200}, ["Demon"] = {corpseid = 5995, chance = 100, health = 12200, maxhealth = 12200}, ["Weedle"] = {corpseid = 5993, chance = 100, health = 12200, maxhealth = 12200}, } local time = 4 -- Tempo para mandar as mensagens e adiciona item function onUse(cid, item, frompos, item2, topos) for i,x in pairs(pokes) do if item2.itemid == x.corpseid then doRemoveItem(item.uid, 1) doRemoveItem(item2.uid, 1) if math.random(1,100) <= x.chance then function add() local s = doPlayerAddItem(cid, pokein) doItemSetAttribute(s, "poke", "This is "..i.."'s pokeball. HP = ["..x.health.."/"..x.maxhealth.."]") doItemSetAttribute(s, "description", "Contains a " .. i) end doSendMagicEffect(topos, 24) addEvent(add, time*1000) return addEvent(doPlayerSendTextMessage, time*1000, cid, 27, "You catch a " .. i .. ".") else addEvent(doPlayerSendTextMessage, time*1000, cid, 27, "Your pokeball broke.") return doSendMagicEffect(topos, 23) end end end return TRUE end work
  5. osa68 não tem comentários em seu perfil ainda. Por que não diz um oi?
    Oi
  6. You could make script of attack for by command pokemons ?. monster following the player, doest teleport when the players run. ? bugs ?
  7. Go/back ++ work Catch ++ work Nurse ++ work Evolution ++ work Surf ++ Fly - dont work help floor ? stepin ? tfs 0.3.6 and 0.4.0
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...