Eai gente.
Estarei postando uns script para pokemon.
Favor n passa sem deixar 1 comentario xD
Testado em: Pokemon Dash 8.54
Vamos la :
[>Bau de Quests<] - Teleporta para HomeTown do Player.
Actions/Script crie 1 arquivo LUA chamado pewterbau e adicione isso dentro:
function onUse (cid,item,frompos,item2,topos) pos = {x=1033, y=1025, z=7} UID_DO_BAU = 7799 STORAGE_VALUE = 7799 ID_DO_PREMIO = 2160 ID_DO_PREMIO2 = 2070 if getPlayerLevel(cid) >= 35 then if item.uid == UID_DO_BAU then queststatus = getPlayerStorageValue(cid,STORAGE_VALUE) if queststatus == -1 then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSendTextMessage(cid,22,"Congratulations.") -- Aqui é colocado o nome do item doPlayerAddItem(cid,ID_DO_PREMIO,50) doPlayerAddItem(cid,ID_DO_PREMIO2,1) setPlayerStorageValue(cid,STORAGE_VALUE,1) else doPlayerSendTextMessage(cid,22,"The chest is empty.") end end else doPlayerSendCancel(cid,'Only levels 35 or up can open this chest.') end return 1 end
Agora em Actions.xml adicione essa linha:
<action uniqueid="7799" event="script" value="pewterbau.lua"/>
Explicando:
if getPlayerLevel(cid) >= 35 then == Lvl para o player poder fazer a quest ID_DO_PREMIO = 2160 == ID do item que o player vai receber doPlayerAddItem(cid,ID_DO_PREMIO,50) == Quantidade do item que o player vai receber.
[>Npc que Pinta Balls<] - Configurada apenas para cores da ub e da pball.
Npc/Script crie 1 arquivo LUA chamado paintball e adicione isso dentro:
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local states = {'1', '2', '3', '4', '5', '6'} local store = {1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151} local unlock = {} local pokeballs = {'2222', '2208'} local pokeballss = {'2220', '2208'} 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 -- Conversa Jogador/NPC if(msgcontains(msg, 'Job') or msgcontains(msg, 'job')) then selfSay('I paint Pokeball, choice between {Ultra ball}, {Poke ball} and {Cloud ball}.', cid) elseif(msgcontains(msg, 'Ultra Ball') or msgcontains(msg, 'ultra ball')) then selfSay('Do you really want to paint ultra ball??', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'Poke Ball') or msgcontains(msg, 'poke ball')) then selfSay('Do you really want to paint poke ball??', cid) talkState[talkUser] = 2 -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if isInArray(pokeballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) and doPlayerRemoveMoney(cid, 35000) then selfSay('Thanks!', cid) local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET) local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]")) doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/"))) doTransformItem(feet.uid, 2220) talkState[talkUser] = 0 else selfSay('Sorry, make sure you have enough money and if the the ball is in the correct slot.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if isInArray(pokeballss, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) and doPlayerRemoveMoney(cid, 20000) then selfSay('Thanks!', cid) local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET) local maxh = tonumber(getItemAttribute(feet.uid, "poke"):match("/(.+)]")) doItemSetAttribute(feet.uid, "poke", getItemAttribute(feet.uid, "poke"):sub(1, findLetter(getItemAttribute(feet.uid, "poke"), "[")) .. maxh .. getItemAttribute(feet.uid, "poke"):sub(findLetter(getItemAttribute(feet.uid, "poke"), "/"))) doTransformItem(feet.uid, 2222) talkState[talkUser] = 0 else selfSay('Sorry, make sure you have enough money and if the the ball is in the correct slot.', cid) talkState[talkUser] = 0 end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Agora em Data/Npc crie 1 npc e adicione isso dentro:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Deka" script="paintball.lua" floorchange="0" speed="0"> <health now="150" max="150"/> <look type="160" head="114" body="0" legs="125" feet="0"/> <parameters> <parameter key="message_greet" value="Hi, I can change your Pokeballs, tell me which style would you want. Make sure your ball is on the slot POKEBALL."/> <parameter key="message_farewell" value="Good bye."/> <parameter key="message_idletimeout" value="Next Please..."/> <parameter key="message_walkaway" value="Next Please..."/> </parameters> </npc>
Para mudar o preço medifique essa linha:
if isInArray(pokeballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) and doPlayerRemoveMoney(cid, 35000) then
Essa Parte:
doPlayerRemoveMoney(cid, 35000) then
Ai esta cobrando 350 Dollars.
[>Npc Diamond Account<] - 10 Diamond por 31 Dias, e outras funçoes.
Npc/Script crie 1 arquivo LUA chamado premium e adicione isso dentro:
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 -- Conversa Jogador/NPC if(msgcontains(msg, 'offer') or msgcontains(msg, 'Offer')) then selfSay('I sell Diamond accounts.', cid) elseif(msgcontains(msg, 'diamond account') or msgcontains(msg, 'Diamond Account')) then selfSay('Diamond account users are able to use ride, teleport, surf and fly. They can also wear all clothes, rent houses and costumize poké balls. Finally, diamond account users have access to the saffari zone and are free of taxes in the casino! If you would like to upgrade your account for a month you will have to pay me 10 diamonds. Would you like to upgrade it?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'bless') or msgcontains(msg, 'Bless')) then selfSay('To be blessed 3 diamonds are necessary, would you like to go on?', cid) talkState[talkUser] = 2 elseif(msgcontains(msg, 'Change Sex') or msgcontains(msg, 'change sex')) then selfSay('To change sex 5 diamonds are necessary, would you like to go on?', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'Change Hometown') or msgcontains(msg, 'change hometown')) then selfSay('To change your hometown five diamonds are needed, what the city wants to choose?', cid) talkState[talkUser] = 4 -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(doPlayerRemoveItem(cid, 2145, 10) == true) then selfSay('Thanks!', cid) doPlayerAddPremiumDays(cid, 31) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) and getPlayerBlessing(cid, 3) and getPlayerBlessing(cid, 4) and getPlayerBlessing(cid, 5) then selfSay('You have already got one or more blessings!', cid) else if(doPlayerRemoveItem(cid, 2145, 3) == true) then selfSay('Thanks!', cid) doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 3) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then doPlayerSetSex(cid, PLAYERSEX_MALE) else doPlayerSetSex(cid, PLAYERSEX_FEMALE) end talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'sendas') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 2) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'falador') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2145, 5) == true) then selfSay('Thanks!', cid) doPlayerSetTown(cid, 1) talkState[talkUser] = 0 else selfSay('You do not have enough diamonds.', cid) talkState[talkUser] = 0 end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Agora em Data/Npc crie 1 npc e adicione isso dentro:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Dalk" script="data/npc/scripts/premium.lua" walkinterval="3000" floorchange="0" access="5" > <health now="150" max="150"/> <look type="259" head="0" body="114" legs="114" feet="0"/> <parameters> <parameter key="message_greet" value="Welcome to the diamond store, here you are able to upgrade your account to diamond(10D), change your hometown(5D), change sex(5D) and blessing(3D)."/> <parameter key="message_farewell" value="Bye! See you next time."/> </parameters> </npc>
Suas funçoes:
Bless por 3 Diamonds Change Sex por 5 Diamonds Change HomeTown 5 Diamonds
Como funciona o change hometown:
Depois de falar Change Hometown. Eh so falar para que city deseja se mudar. Esta configurado apenas para as citys : " falador " e " sendas ".
[>Npc Elite Lee And Chan <] - Troca de Pokemons
Esse Npc serve para fazer a troca de 1 Hitmonlee + 200k por 1 Elite hitmonlee, igualmente para o hitmonchan so que por Elite Hitmonchan.
Go:
Npc\Script crie 1 arquivo LUA chamado elitenpc e coloquei isso dentro:
local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false local talkState = {} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye sir!') 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 sellPokemon(cid, name, price) 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 if(doPlayerRemoveMoney(cid, 20000000)) then doRemoveItem(pok, 1) local health = 7800 -- Health do poke local maxhealth = 7800 -- Maximo de health do poke local description = "Contains a Elite Hitmonlee." local poke1 = "This is Elite Hitmonlee's pokeball. HP = ["..health.."/"..maxhealth.."]" item = doCreateItemEx(2219) doItemSetAttribute(item, "poke", poke1) doItemSetAttribute(item, "nome", "Elite Hitmonlee") doItemSetAttribute(item, "description", description) doPlayerAddItemEx(cid, item, true) doTransformItem(item, 2222) selfSay('Thank You for letting me train him.') return true end end end for _, pok in pairs(itemsultra) do if string.lower(getItemAttribute(pok, "poke"):sub(9, findLetter(getItemAttribute(pok, "poke"), "'")-1)) == pokename then if(doPlayerRemoveMoney(cid, 20000000)) then doRemoveItem(pok, 1) local health = 7800 -- Health do poke local maxhealth = 7800 -- Maximo de health do poke local description = "Contains a Elite Hitmonlee." local poke1 = "This is Elite Hitmonlee's pokeball. HP = ["..health.."/"..maxhealth.."]" item = doCreateItemEx(2219) doItemSetAttribute(item, "poke", poke1) doItemSetAttribute(item, "nome", "Elite Hitmonlee") doItemSetAttribute(item, "description", description) doPlayerAddItemEx(cid, item, true) doTransformItem(item, 2220) selfSay('Thank You for letting me train him.') return true end end end selfSay('Hey, you do not have that pokemon or the amount of money we agreed!') end function sellPokemonn(cid, name, price) 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 if(doPlayerRemoveMoney(cid, 20000000)) then doRemoveItem(pok, 1) local health = 7800 -- Health do poke local maxhealth = 7800 -- Maximo de health do poke local description = "Contains a Elite Hitmonchan." local poke1 = "This is Elite Hitmonchan's pokeball. HP = ["..health.."/"..maxhealth.."]" item = doCreateItemEx(2219) doItemSetAttribute(item, "poke", poke1) doItemSetAttribute(item, "nome", "Elite Hitmonchan") doItemSetAttribute(item, "description", description) doPlayerAddItemEx(cid, item, true) doTransformItem(item, 2222) selfSay('Thank You for letting me train him.') return true end end end for _, pok in pairs(itemsultra) do if string.lower(getItemAttribute(pok, "poke"):sub(9, findLetter(getItemAttribute(pok, "poke"), "'")-1)) == pokename then if(doPlayerRemoveMoney(cid, 20000000)) then doRemoveItem(pok, 1) local health = 7800 -- Health do poke local maxhealth = 7800 -- Maximo de health do poke local description = "Contains a Elite Hitmonchan." local poke1 = "This is Elite Hitmonchan's pokeball. HP = ["..health.."/"..maxhealth.."]" item = doCreateItemEx(2219) doItemSetAttribute(item, "poke", poke1) doItemSetAttribute(item, "nome", "Elite Hitmonchan") doItemSetAttribute(item, "description", description) doPlayerAddItemEx(cid, item, true) doTransformItem(item, 2220) selfSay('Thank You for letting me train him.') return true end end end selfSay('Hey, you do not have that pokemon or the amount of money we agreed!') end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if (msgcontains(msg, 'bye') and focus == cid) then selfSay('See you around then!') focus = 0 elseif (msgcontains(msg, 'hi') and (focus == 0) and (focus ~= cid) and (getDistanceToCreature(cid) <= 4)) then selfSay('Welcome! I train pokemons fighters, you have a fighter pokemon?.') focus = cid talkState[talkUser] = 1 talk_start = os.clock() elseif (msgcontains(msg, 'machamp') and talkState[talkUser] == 1 and focus == cid) then selfSay('It is impossible to defend against punches and chops distributed by his four arms. It has a great fighting spirit.') elseif (msgcontains(msg, 'thx') and talkState[talkUser] == 1 and focus == cid) then selfSay('Its nothing, tell me if you need something more.') talkState[talkUser] = 1 ---------------------------------------------------------------- elseif (msgcontains(msg, 'machoke') and talkState[talkUser] == 1 and focus == cid) then selfSay('It has a powerful body, uses a belt to power savings to regulate their movements.') elseif (msgcontains(msg, 'thx') and talkState[talkUser] == 1 and focus == cid) then selfSay('Its nothing, tell me if you need something more.') talkState[talkUser] = 1 ---------------------------------------------------------------- elseif (msgcontains(msg, 'machop') and talkState[talkUser] == 1 and focus == cid) then selfSay('A very good pokemon for intense workouts, has a great facility to master all forms of martial arts.') elseif (msgcontains(msg, 'thx') and talkState[talkUser] ~= 1 and focus == cid) then selfSay('Its nothing, tell me if you need something more.') talkState[talkUser] = 1 ---------------------------------------------------------------- elseif (msgcontains(msg, 'poliwrath') and talkState[talkUser] == 1 and focus == cid) then selfSay('Has developed muscles, the muscles used for quick attacks despite being in the water.') elseif (msgcontains(msg, 'thx') and talkState[talkUser] == 1 and focus == cid) then selfSay('Its nothing, tell me if you need something more.') talkState[talkUser] = 1 ---------------------------------------------------------------- elseif (msgcontains(msg, 'primeape') and talkState[talkUser] == 1 and focus == cid) then selfSay('An angry pokemon. gets even more furious when he lost a fight.') elseif (msgcontains(msg, 'thx') and talkState[talkUser] == 1 and focus == cid) then selfSay('Its nothing, tell me if you need something more.') talkState[talkUser] = 1 ---------------------------------------------------------------- elseif (msgcontains(msg, 'hitmonlee') and talkState[talkUser] == 1 and focus == cid) then selfSay('Interesting! Is a pokemon with legs fast and hard, has devastating kicks. Always wanted to train one of these, if you want I can train him for a sum of 200k. Accepted?') talkState[talkUser] = "hitmonlee" elseif (msgcontains(msg, 'yes') and talkState[talkUser] == "hitmonlee" and focus == cid) then sellPokemon(cid, "hitmonlee", 1) talkState[talkUser] = 1 ---------------------------------------------------------------- elseif (msgcontains(msg, 'hitmonchan') and talkState[talkUser] == 1 and focus == cid) then selfSay('Is a great boxer, a man who never gives up. I always wanted to train one of these. For an amount of 200k I can transform it into a great boxer. Accepted?') talkState[talkUser] = "hitmonchan" elseif (msgcontains(msg, 'yes') and talkState[talkUser] == "hitmonchan" and focus == cid) then sellPokemonn(cid, "hitmonchan", 1) talkState[talkUser] = 1 end end function onThink() if focus == 0 then selfTurn(1) else argx, argy, argz = selfGetPosition() dir = getDirectionTo({x=argx,y=argy,z=argz}, getThingPos(focus)) if dir == 7 then dir = 0 elseif dir == 6 then dir = 3 elseif dir == 5 then dir = 1 elseif dir == 4 then dir = 3 end selfTurn(dir) end if (os.clock() - talk_start) > 59 then if focus ~= 0 then selfSay('We have been talking for too much time!') focus = 0 end end if focus ~= 0 then a, b, c = selfGetPosition() if c ~= getThingPos(focus).z then focus = 0 end end if focus ~= 0 then if getDistanceToCreature(focus) > 4 then selfSay('Come back to sell me pokemons!') focus = 0 end end return true end
Data/Npc crie 1 npc e adicione isso dentro:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Raviel" script="elitenpc.lua" walkinterval="350000" floorchange="0" speed="0"> <health now="150" max="150"/> <look type="313"/> <parameters> <parameter key="message_greet" value="Welcome! I train pokemons fighters, you have a fighter pokemon?"/> <parameter key="message_farewell" value="Bye."/> <parameter key="message_idletimeout" value="Bye."/> <parameter key="message_walkaway" value="Bye."/> </parameters> </npc>
O npc ira perguntar se vc tem algum pokemon do tipo lutador.
Se falar Hitmonlee ow Hitmonchan ele dará uma breve descrição deles , e fala que sempre teve vontade de treinar 1 desses.
Ai eh só o player fala Yes com 1 desses 2 pokes na bag + 200k e pronto.
Com os outros pokes , ele soh irar falar sobre eles.
Change Log V.1.0 - 12/03
Npc do script " elitenpc " adicionado Script do elitenpc alterado, adicionado + descrições para outros pokemons lutadores. Npc Diamond Account modificado, estava com pequeno bug na fala quando comprava bless
Entao eh isso gente.
Nao passe sem comentar..

Mesmo que seja criticas
