PedroSouza 1 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 (editado) @PedroSouza reportado por flood! e ja tem o npc cassino no serv... @Mated explique melhor oq vc quer fazer mano.. mas de todo jeito as passivas ficam em creaturescripts/scripts/exp.lua-ou-exp2.0.lua... fica no final do script... local focus = 0 local talk_start = 0 local price = 0 local conv = 0 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) local msg = string.lower(msg) if focus == cid then talk_start = os.clock() end if msgcontains(msg, 'bye') and focus == cid then selfSay('Have a nice gambling!') focus = 0 return true end if msgcontains(msg, 'no') and focus == cid and conv == 0 then selfSay('Ok then, feel free to come back whenever you want to.') focus = 0 return true end if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) <= 3 then selfSay("Hello! You are at the Celadon's Gamer Corner. To gamble here, you need cassino coins. Do you want to buy some?") focus = cid talk_start = os.clock() conv = 0 return true end if ((msgcontains(msg, 'yes') and conv == 0) or msgcontains(msg, 'coins')) and focus == cid and conv ~= 1 then selfSay('Tell me, how many coins do you wish to buy?') conv = 1 return true end if tonumber(msg) ~= nil and tonumber(msg) >= 1 and tonumber(msg) <= 500 and focus == cid then if getPlayerStorageValue(cid, 23254) >= 1000 then selfSay("It seems that you already have a lot of coins! You can't buy more coins if you already have more than 1000.") return true end if price / 10 == tonumber(msg) then return true end price = tonumber(msg) * 10 selfSay(""..msg.." coins are going to cost "..price.." dollars, can you afford it?") conv = 3 return true end if tonumber(msg) ~= nil and (tonumber(msg) < 1 or tonumber(msg) > 500) and focus == cid then selfSay("I can sell only sell amounts between 1 and 500 of coins at once!") conv = 2 return true end if msgcontains(msg, 'yes') and conv == 3 and focus == cid then if getPlayerStorageValue(cid, 23254) == -1 then setPlayerStorageValue(cid, 23254, 0) end if doPlayerRemoveMoney(cid, price * 100) then local amount = price / 10 setPlayerStorageValue(cid, 23254, getPlayerStorageValue(cid, 23254) + amount) selfSay("Here you are! You bought "..amount.." cassino coins, have a nice gambling!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You bought "..amount.." cassino coins. Now you have a total of "..getPlayerStorageValue(cid, 23254).." cassino coins.") else selfSay("Sorry, buy you don't have enough money to pay for it!") end conv = 2 return true end if msgcontains(msg, 'no') and conv == 3 and focus == cid then selfSay("So, would you like to buy any coins?") conv = 0 return true end end local intervalmin = 38 local intervalmax = 70 local delay = 25 local number = 1 local messages = {"Come here to buy cassino coins! Check our prices!", "Looking for coins? You can buy them here!", "Check out our prices! Start gambling today!", "Did you know you can exchange coins for wonderful prizes?", } function onThink() if focus == 0 then selfTurn(1) delay = delay - 0.5 if delay <= 0 then selfSay(messages[number]) number = number + 1 if number > #messages then number = 1 end delay = math.random(intervalmin, intervalmax) end return true else if not isCreature(focus) then focus = 0 return true end local npcpos = getThingPos(getThis()) local focpos = getThingPos(focus) if npcpos.z ~= focpos.z then focus = 0 return true end if getDistanceToCreature(focus) > 3 then selfSay('Come back whenever you want to buy more coins!') focus = 0 return true end local dir = doDirectPos(npcpos, focpos) selfTurn(dir) end if os.clock() - talk_start > 59 then selfSay('We can talk later, when you are decided about what to buy.') focus = 0 end return true end /\ Esse é o NPC que veio no Servidor "sem level" Editado Agosto 19, 2012 por PedroSouza Link para o comentário Compartilhar em outros sites More sharing options...
Mated 1 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 slicer eu queria colocar assim ex:quando o scyther começa a rodar do nada e solta atacks ao redor dele tipo ali naquela passiva ele muda a outifit ou queria por pra tipo... o blastoise tem um attack Hydro Cannon ai tenho aki uma sprite dele se abaixando e soltaando o attack ai queria por pra na que ele solta o Hydro Cannon ele abaixa e fazer a outifit com o movimento dela Link para o comentário Compartilhar em outros sites More sharing options...
Wiisht 3 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 @Slicer cara você poderia me ajudar em uma coisa sobre a promo ? tipo na promo voce avança de rank apenas dizendo "hi" "rank" "yes" tem algum modo onde eu possa encaixar no script um metodo para tipo "hi" "rank" ai o npc pede alguns itens somente ai se tiver os itens voce passa de rank se não, não passa. tem algum jeito para isso ? .-. Script: 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 rank = {"a Malefic Troublemaker", "a Malefic Venomancer","a Malefic Spectre","a Malefic Nightwalker","a Malefic Master"} if msgcontains(msg, 'clan') or msgcontains(msg, 'Clan') then if getPlayerStorageValue(cid, 86228) == 5 then selfSay("You already are of the clan malefic!", cid) talkState[talkUser] = 0 return true elseif getPlayerStorageValue(cid, 86228) >= 1 then selfSay("You already are of another clan!", cid) talkState[talkUser] = 0 return true end selfSay("So you want to join in my clan... Are you sure that?", cid) talkState[talkUser] = 2 elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 2 then if getPlayerLevel(cid) < 80 then selfSay("You are too weak yet... You need to be atleast level 80 to enter in the clan!", cid) talkState[talkUser] = 0 return true end selfSay("OK then... Now you are a great member of de clan malefic!", cid) setPlayerStorageValue(cid, 86228, 5) setPlayerStorageValue(cid, 862281, 1) setPlayerStorageValue(cid, 181615, 1) talkState[talkUser] = 0 elseif msgcontains(msg, 'rank') or msgcontains(msg, 'rank') then if getPlayerStorageValue(cid, 86228) == 5 then selfSay("So.. you want to move up of rank?", cid) talkState[talkUser] = 3 else selfSay("You aren't of the clan malefic! Get out of here!", cid) talkState[talkUser] = 0 return true end elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 3 then level = 80 if (getPlayerStorageValue(cid, 862281)+1) == 2 then level = 90 elseif (getPlayerStorageValue(cid, 862281)+1) == 3 then level = 100 elseif (getPlayerStorageValue(cid, 862281)+1) == 4 then level = 110 elseif (getPlayerStorageValue(cid, 862281)+1) == 5 then level = 120 end if getPlayerLevel(cid) < level then selfSay("You are too weak yet... You need to be atleast level "..level.." to move up of rank!", cid) talkState[talkUser] = 0 return true end if getPlayerStorageValue(cid, 862281) == 5 then selfSay("You are already a master of our clan!", cid) talkState[talkUser] = 0 return true end setPlayerStorageValue(cid, 862281, getPlayerStorageValue(cid, 862281)+1) if getPlayerStorageValue(cid, 862281) == 5 then setPlayerStorageValue(cid, 181624, 1) end selfSay("So here we are... You are now a "..rank[getPlayerStorageValue(cid, 862281)]..", rank "..getPlayerStorageValue(cid, 862281).." of our clan!", cid) talkState[talkUser] = 0 elseif msgcontains(msg, 'shiny') or msgcontains(msg, 'Shiny') then if getPlayerStorageValue(cid, 86228) ~= 5 then selfSay("You aren't of the clan Malefic! Get out of here!", cid) return true else selfSay("So you want to transform your Nidoking in a Shiny Nidoking? It will cost 500k!", cid) talkState[talkUser] = 4 end elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 4 then if getPlayerSlotItem(cid, 8).uid <= 0 then selfSay("Sorry, you don't have a pokemon in the main slot!", cid) talkState[talkUser] = 0 return true end --alterado v1.2 if #getCreatureSummons(cid) >= 1 then selfSay("Go back your pokemon!", cid) talkState[talkUser] = 0 return true end local pb = getPlayerSlotItem(cid, 8).uid if getItemAttribute(pb, "poke") ~= "Nidoking" then selfSay("Put a Nidoking's pokeball atleast +20 in main slot!", cid) talkState[talkUser] = 0 return true end if not getItemAttribute(pb, "boost") or getItemAttribute(pb, "boost") < 20 then selfSay("Sorry, your Nidoking is not boosted +20!", cid) talkState[talkUser] = 0 return true end --100000 = 1k, 1000000 = 10k, 10000000 = 100k if doPlayerRemoveMoney(cid, 50000000) == true then selfSay("So there is it! Enjoy!", cid) doItemSetAttribute(pb, "hp", 1) doItemSetAttribute(pb, "poke", "Shiny Nidoking") doItemSetAttribute(pb, "description", "Contains a Shiny Nidoking.") doItemEraseAttribute(pb, "boost") doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos["Shiny Nidoking"]) if useKpdoDlls then doCreatureExecuteTalkAction(cid, "/pokeread") end talkState[talkUser] = 0 return true else selfSay("You don't have enough money!", cid) talkState[talkUser] = 0 return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) vlw =D Link para o comentário Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 @pedro n na verdade esse eh o npc cassino q eu to flando... local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function doBuyPokemonWithCasinoCoins(cid, poke) npcHandler:onSellpokemon(cid) end 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 function buyPoke(cid, pokemon, price) if pokemon == "" then return true end local gender = getRandomGenderByName(pokemon) local btype = "normal" local happy = 180 if getPlayerFreeCap(cid) >= 6 or getContainerSize(getPlayerSlotItem(cid, 3).uid) >= 32 then item = doCreateItemEx(11826) else item = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, 11826, 1) end doItemSetAttribute(item, "poke", pokemon) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "description", "Contains a "..pokemon..".") doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".") --alterado v1.6 if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then doPlayerSendMailByName(getCreatureName(cid), item, 1) end setPlayerStorageValue(cid, 23254, getPlayerStorageValue(cid, 23254) - price) end ------------------------------------------------------------------------------ if msgcontains(msg, 'pokemon') then selfSay("Hello ".. getCreatureName(cid) .. ", I have three Pokemons to choose one among them, {Eevee}, {Porygon} and {Ditto}, which would you choose? ", cid) talkState[cid] = 1 elseif (msgcontains(msg, 'Eevee') or msgcontains(msg, 'eevee')) and talkState[cid] == 1 then selfSay("Are you sure you want buy an Eevee for 22000 cassino coins?", cid) talkState[cid] = 2 elseif (msgcontains(msg, 'Porygon') or msgcontains(msg, 'porygon')) and talkState[cid] == 1 then selfSay("Are you sure you want buy an Porygon for 45000 cassino coins?", cid) talkState[cid] = 3 elseif (msgcontains(msg, 'Ditto') or msgcontains(msg, 'ditto')) and talkState[cid] == 1 then selfSay("Are you sure you want buy an Ditto for 60000 cassino coins?", cid) talkState[cid] = 4 elseif (msgcontains(msg, 'nao') or msgcontains(msg, 'no')) and talkState[cid] == 2 then selfSay("Did not like this choice? You can choose one {Porygon} or one {Ditto} too.", cid) talkState[cid] = 1 elseif (msgcontains(msg, 'nao') or msgcontains(msg, 'no')) and talkState[cid] == 3 then selfSay("Did not like this choice? You can choose one {Eevee} or one {Ditto} too.", cid) talkState[cid] = 1 elseif (msgcontains(msg, 'nao') or msgcontains(msg, 'no')) and talkState[cid] == 4 then selfSay("Did not like this choice? You can choose one {Eevee} or one {Porygon} too.", cid) talkState[cid] = 1 elseif (msgcontains(msg, 'sim') or msgcontains(msg, 'yes')) and talkState[cid] == 2 then if getPlayerStorageValue(cid, 23254) >= 22000 then local pokemon = "Eevee" local price = 22000 buyPoke(cid, pokemon, price) selfSay("Here you are! You have just bought an "..pokemon.." for "..price.." casino coins!", cid) talkState[cid] = 0 else selfSay("You don't have enought cassino coins!", cid) talkState[cid] = 0 end elseif (msgcontains(msg, 'sim') or msgcontains(msg, 'yes')) and talkState[cid] == 3 then if getPlayerStorageValue(cid, 23254) >= 45000 then local pokemon = "Porygon" local price = 45000 buyPoke(cid, pokemon, price) selfSay("Here you are! You have just bought an "..pokemon.." for "..price.." casino coins!", cid) talkState[cid] = 0 else selfSay("You don't have enought cassino coins!", cid) talkState[cid] = 0 end elseif (msgcontains(msg, 'sim') or msgcontains(msg, 'yes')) and talkState[cid] == 4 then if getPlayerStorageValue(cid, 23254) >= 60000 then local pokemon = "Ditto" local price = 60000 buyPoke(cid, pokemon, price) selfSay("Here you are! You have just bought an "..pokemon.." for "..price.." casino coins!", cid) talkState[cid] = 0 else selfSay("You don't have enought cassino coins!", cid) talkState[cid] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) @Mated entao eh em lib/pokemon moves.lua.. procura por "hydro cannon" e digamos assim.. "se vira" '-' n eh dificil fazer isso... ;x @Wiisht mano da uma olhada no npc "box 3.lua"... la tem uma parte q o npc pede itens.. eh soh pega a base e dai fazer do teu jeito... ;x dai eh soh colocar a checagem dos itens embaixo de.. if getPlayerStorageValue(cid, 862281) == 5 then selfSay("You are already a master of our clan!", cid) talkState[talkUser] = 0 return true end @DantesWakening n n irei.. para ser sincero... n to com a minina vontade de criar 900 e poucos itens... ;/ sorry... Link para o comentário Compartilhar em outros sites More sharing options...
rDs7008 47 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 @slicer e.e fiz todos os buffs / debuffs/ disables por POO o/ foi realmente uma boa idéia haha agora vou mecher nas spells e nos danos e.e Link para o comentário Compartilhar em outros sites More sharing options...
brendomaster 0 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 Slicer pode tentar me explicar isso no post do SmiX ? la no post ele fala isso Agora vamos a lib: crie qual arquivo lua dentro e cole isso: icons = { ["Bulbasaur"] = { on = Aqui é o id da ball on, off = Aqui a off , use = e aqui ela em uso },} Qual o nome do arquivo que eu tenho que colocar isso? Link para o comentário Compartilhar em outros sites More sharing options...
enrico258 0 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 Aonde esta as sprites do meu ot pq quero mudar a cor dos pokemons Aonde eu acho??? Link para o comentário Compartilhar em outros sites More sharing options...
Wiisht 3 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 if getPlayerStorageValue(cid, 862281) == 5 then selfSay("You are already a master of our clan!", cid) talkState[talkUser] = 0 return true end ----------------------------------- --id dos itens{Trace of ghost, Ice orb, Gosme, Pot of Lava, Electric box, Ruby, Water pendant, Belt of champion, Bug venom, Bug antena} local itens = {12194, 12204, 12201, 12202, 12152, 12176, 12188, 12170, 12195, 12185, 12184} --------- -------------- local function checkItens(cid, itens) local check = 0 for i = 1, #itens do if getPlayerItemCount(cid, itens) >= 10 then check = check + 1 end end return check end ------------------------------------- elseif (msgcontains(msg, 'sim') or msgcontains(msg, 'yes')) and talkState[cid] == 5 and getPlayerStorageValue(cid, 659875) == 4 then local check3 = checkItens(cid, itens) if check3 == #itens then for a = 1, #itens do doPlayerRemoveItem(cid, itens[a], 10) end selfSay("Thank you very much, let me know if you want another mission.", cid) setPlayerStorageValue(cid, 659875, 5) else selfSay("You don't have some item which i asked for you...", cid) talkState[cid] = 0 return true end ta correto ? .-. (obs não mudei storages ainda e nem itens) Link para o comentário Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 @DantesWakening achu q ele quis dizer.. va a lib e crie um arquivo qlqr... como eh na lib.. n importa o nome do arquivo... ;p por exemplo.. no serv dele ele crio um arquivo com o nome pokeballs... @enrico258 vai estuda sobre servs e scripts.. soh isso q te digo.. e para de floodar --' Link para o comentário Compartilhar em outros sites More sharing options...
Mated 1 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 blz slicer vou ver oq posso fazer aki to sem rep agr amanha te dou um xd Link para o comentário Compartilhar em outros sites More sharing options...
enrico258 0 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 Ta ajudando todo mundo ai pq eu não?? Link para o comentário Compartilhar em outros sites More sharing options...
brendomaster 0 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 (editado) Slicer, eu tentei colocar aqui no meu server o sistema dele e coloquei o nome iconsystem.lua no arquivo nas libs Mas não funciona não deu erro no executavel nem nada só não funcionou Bom não sei se pode ser isso mas aqui no meu server eu não consegui achar isso doTransformItem(item, pokeballs[typeee].on) no catch system.lua do meu servidor Editado Agosto 19, 2012 por DantesWakening Link para o comentário Compartilhar em outros sites More sharing options...
BlastFury 0 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 (editado) Ola Galera bom to aqui pra fazer meio que um pedido quem um amigo que tem ot server me pediu, bom é o seguinte alguem tem uma script de um npc que troca seu pokemon ex lvl 30 por otro pokemon igual (aerodacyl por aerodactyl é so um exemplo) para lvl 1 ? Se alguem tiver ai pode postar aqui agradeço. Se não tiver completa posta so uma base porque posso editar tmb rsrsrs. Agradeço desde agora =) Editado Agosto 19, 2012 por BlastFury Link para o comentário Compartilhar em outros sites More sharing options...
digodigo2 2 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 (editado) @Slicer sera que vc poderia fazer nessa Versão aquele negocio que eu dei um exemplo ^^ Eu agradeço ^^ Editado Agosto 19, 2012 por digodigo2 Link para o comentário Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Agosto 19, 2012 Share Postado Agosto 19, 2012 (editado) @Wiisht eu tava flando algu +/- assim.. ;p 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 local function checkItens(cid, itens) local check = 0 for i = 1, #itens do if getPlayerItemCount(cid, itens[1]) >= itens[2] then check = check + 1 end end return check end local itens = { --{id, qntdade} itens q vai pedir pro rank2, 3, 4 e 5 [2] = {{12194, 10}, {12204, 5}, {12201, 20}, {12202, 5}, {12152, 15}, {12176, 25}, {12188, 10}, {12170, 15}, {12195, 5}, {12185, 5}, {12184, 15}}, [3] = {{12194, 10}, {12204, 5}, {12201, 20}, {12202, 5}, {12152, 15}, {12176, 25}, {12188, 10}, {12170, 15}, {12195, 5}, {12185, 5}, {12184, 15}}, [4] = {{12194, 10}, {12204, 5}, {12201, 20}, {12202, 5}, {12152, 15}, {12176, 25}, {12188, 10}, {12170, 15}, {12195, 5}, {12185, 5}, {12184, 15}}, [5] = {{12194, 10}, {12204, 5}, {12201, 20}, {12202, 5}, {12152, 15}, {12176, 25}, {12188, 10}, {12170, 15}, {12195, 5}, {12185, 5}, {12184, 15}}, } rank = {"a Seavell Drop", "a Seavell Icelake","a Seavell Waterfall","a Seavell Frost","a Seavell Master"} if msgcontains(msg, 'clan') or msgcontains(msg, 'Clan') then if getPlayerStorageValue(cid, 86228) == 2 then selfSay("You already are of the clan seavel!", cid) talkState[talkUser] = 0 return true elseif getPlayerStorageValue(cid, 86228) >= 1 then selfSay("You already are of another clan!", cid) talkState[talkUser] = 0 return true end selfSay("So you want to join in my clan... Are you sure that?", cid) talkState[talkUser] = 2 elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 2 then if getPlayerLevel(cid) < 80 then selfSay("You are too weak yet... You need to be atleast level 80 to enter in the clan!", cid) talkState[talkUser] = 0 return true end selfSay("OK then... Now you are a great member of de clan seavel!", cid) setPlayerStorageValue(cid, 86228, 2) setPlayerStorageValue(cid, 862281, 1) setPlayerStorageValue(cid, 181619, 1) talkState[talkUser] = 0 elseif msgcontains(msg, 'rank') or msgcontains(msg, 'rank') then if getPlayerStorageValue(cid, 86228) == 2 then --//////////////////////////////////////////////////////////////////////////////-- local level = 80 if (getPlayerStorageValue(cid, 862281)+1) == 2 then level = 90 elseif (getPlayerStorageValue(cid, 862281)+1) == 3 then level = 100 elseif (getPlayerStorageValue(cid, 862281)+1) == 4 then level = 110 elseif (getPlayerStorageValue(cid, 862281)+1) == 5 then level = 120 end --//////////////////////////////////////////////////////////////////////////////-- if getPlayerLevel(cid) < level then selfSay("You are too weak yet... You need to be atleast level "..level.." to move up of rank!", cid) talkState[talkUser] = 0 return true end --//////////////////////////////////////////////////////////////////////////////-- if getPlayerStorageValue(cid, 862281) == 5 then selfSay("You are already a master of our clan!", cid) talkState[talkUser] = 0 return true end --//////////////////////////////////////////////////////////////////////////////-- local bring = itens[getPlayerStorageValue(cid, 862281)+1] local it = "" for i = 1, #bring do if i == #bring then it = it..""..bring[2].." "..getItemInfo(bring[1]).name else it = it..""..bring[2].." "..getItemInfo(bring[1]).name..", " end end --//////////////////////////////////////////////////////////////////////////////-- selfSay("You have bring to me: "..it.."?", cid) talkState[talkUser] = 3 else selfSay("You aren't of the clan seavel! Get out of here!", cid) talkState[talkUser] = 0 return true end elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 3 then local check3 = checkItens(cid, itens[getPlayerStorageValue(cid, 862281)+1]) if check3 ~= #itens[getPlayerStorageValue(cid, 862281)+1] then selfSay("You don't have some items which i asked for you", cid) talkState[talkUser] = 0 return true else for a = 1, #itens[getPlayerStorageValue(cid, 862281)+1] do doPlayerRemoveItem(cid, itens[getPlayerStorageValue(cid, 862281)+1][a][1], itens[getPlayerStorageValue(cid, 862281)+1][a][2]) end setPlayerStorageValue(cid, 862281, getPlayerStorageValue(cid, 862281)+1) if getPlayerStorageValue(cid, 862281) == 5 then setPlayerStorageValue(cid, 181622, 1) end selfSay("So here we are... You are now a "..rank[getPlayerStorageValue(cid, 862281)]..", rank "..getPlayerStorageValue(cid, 862281).." of our clan!", cid) talkState[talkUser] = 0 end elseif msgcontains(msg, 'shiny') or msgcontains(msg, 'Shiny') then if getPlayerStorageValue(cid, 86228) ~= 2 then selfSay("You aren't of the clan Seavel! Get out of here!", cid) return true else selfSay("So you want to transform your Vaporeon in a Shiny Vaporeon? It will cost 500k!", cid) talkState[talkUser] = 4 end elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 4 then if getPlayerSlotItem(cid, 8).uid <= 0 then selfSay("Sorry, you don't have a pokemon in the main slot!", cid) talkState[talkUser] = 0 return true end --alterado v1.2 if #getCreatureSummons(cid) >= 1 then selfSay("Go back your pokemon!", cid) talkState[talkUser] = 0 return true end local pb = getPlayerSlotItem(cid, 8).uid if getItemAttribute(pb, "poke") ~= "Vaporeon" then selfSay("Put a Vaporeon's pokeball atleast +20 in main slot!", cid) talkState[talkUser] = 0 return true end if not getItemAttribute(pb, "boost") or getItemAttribute(pb, "boost") < 20 then selfSay("Sorry, your Vaporeon is not boosted +20!", cid) talkState[talkUser] = 0 return true end --100000 = 1k, 1000000 = 10k, 10000000 = 100k if doPlayerRemoveMoney(cid, 50000000) == true then selfSay("So there is it! Enjoy!", cid) doItemSetAttribute(pb, "hp", 1) doItemSetAttribute(pb, "poke", "Shiny Vaporeon") doItemSetAttribute(pb, "description", "Contains a Shiny Vaporeon.") doItemEraseAttribute(pb, "boost") doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos["Shiny Vaporeon"]) if useKpdoDlls then doCreatureExecuteTalkAction(cid, "/pokeread") end talkState[talkUser] = 0 return true else selfSay("You don't have enough money!", cid) talkState[talkUser] = 0 return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) ps: esse eh do seavel.. e os itens sao o da box.. dai eh soh mudar a seu gosto.. e eu fiz as pressas aki.. testei bem rapido.. pode haver bugs.. ;p @enrico258 pq isso eh o basico de um ot.. sinceramente, se tu n sabe disso ainda.. n tem pq tu esta aki olhando esse topico... @digodigo2 ja ta feito desde quando tu mencionou isso hehe Editado Agosto 19, 2012 por Slicer Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados