Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. é isso mesmo,o id das pokebollas são diferentes tem que editar ali alias qual o seu servidor pokemon?
  2. é uma função que pega o nome do leader da guild,dá para fazer algo interessante como adicionar itens ao lider da guild depois de completar um "war",etc adicionando: 050-function function getGuildLeaderName(GuildName) -- function by vodkart local leader = db.getResult("SELECT `players`.`name` FROM `players` WHERE `players`.`id` = (SELECT `guilds`.`ownerid` FROM `guilds` WHERE `guilds`.`name` = ".. db.escapeString(GuildName) .. ")") if(leader:getID() ~= -1) then return leader:getDataString("name") end return nil end exemplo de uso em talkactions: exemplo em actions: FLW
  3. é por causa dessa parte: if getPlayerSkillLevel(cid, 6) <= 11 then doPlayerAddSkillTry(cid, 6, 1) end ou sejá limita a sua skill para 12 e não dá mais de upar skill fishing :T
  4. ta ai http://www.xtibia.com/forum/topic/134875-matar-monstro-abrir-tp-remover-parede-ganhar-storage/ qualquer duvida posta
  5. function onSay(cid, words, param) local lvl = 400 local t = { [206] = {voc = 303,out = {lookType=277,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50},text = "SSJ5 !"}, [252] = {voc = 305,out = {lookType=324,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50},text = "GRRRWWW !"} } local x = t[getPlayerVocation(cid)] if (not x) then return doPlayerSendCancel(cid,"Você não tem vocação!") elseif getPlayerLevel(cid) < lvl then return doPlayerSendCancel(cid,"Você não tem level!") end doPlayerSetVocation(cid,x.voc) doSetCreatureOutfit(cid, x.out, -1) doPlayerSay(cid,x.text,16) doSendMagicEffect(getPlayerPosition(cid),82) return TRUE end
  6. Eu também já sabia usar os.date há algum tempo,mais seu tutorial está ótimo,além disso os.date é muito importante para criar eventos ou executar algo em determinado mês/dia/hora/minuto. Parabéns REP + and Tópico Recomendando!
  7. Antes de tudo, va na pasta data/lib e adicione um script.lua com o nome de pokeLib e adicione isso: pokein, pokeout = 2222,2223 function doRemoveTile(pos)-- Script by mock pos.stackpos = 0 local sqm = getTileThingByPos(pos) doRemoveItem(sqm.uid,1) end function doCreateTile(id,pos) -- By mock doAreaCombatHealth(0,0,pos,0,0,0,CONST_ME_NONE) doCreateItem(id,1,pos) end function getPosDirs(p, dir) -- By MatheusMkalo return dir == 1 and {x=p.x-1, y=p.y, z=p.z} or dir == 2 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 3 and {x=p.x, y=p.y+1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x+1, y=p.y, z=p.z} or dir == 6 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 7 and {x=p.x, y=p.y-1, z=p.z} or dir == 8 and {x=p.x-1, y=p.y-1, z=p.z} end function doItem(pos,a,d)-- Script by mock doCreateTile(460,pos) pos.stackpos = 0 local c = getTileThingByPos(pos) doItemSetAttribute(c.uid, "aid", a) end function getDescription(uid) for i,x in pairs(getItemDescriptions(uid)) do if i == "special" then return x end end end function findLetter(string, letter) for i = 1, #string do if string:sub(i, i) == letter then return i end end end function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function getPosDirs(p, dir) return dir == 1 and {x=p.x-1, y=p.y, z=p.z} or dir == 2 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 3 and {x=p.x, y=p.y+1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x+1, y=p.y, z=p.z} or dir == 6 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 7 and {x=p.x, y=p.y-1, z=p.z} or dir == 8 and {x=p.x-1, y=p.y-1, z=p.z} end function canSummon(cid) local pos = getCreaturePosition(cid) local state = false for i = 1, 8 do if isWalkable(getPosDirs(getCreaturePosition(cid), i)) then state = true end end return state end function isPlayerSummon(cid, uid) if getCreatureMaster(uid) == cid then return TRUE end return FALSE end function getSummonLifes(cid) for _,x in pairs(getCreatureSummons(cid)) do return getCreatureHealth(x), getCreatureMaxHealth(x) end end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag[i]) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function addPokeball(cid, pokename, maxh) local s = doPlayerAddItem(cid, pokein) doItemSetAttribute(s, "poke", "This is "..pokename.."'s pokeball. HP = ["..maxh.."/"..maxh.."]") doItemSetAttribute(s, "description", "Contains a " .. pokename) end function getPokeOutLive(cid) dat = {} for slot = CONST_SLOT_FIRST, CONST_SLOT_LAST do local item = getPlayerSlotItem(cid, slot) if isContainer(item.uid) then local items = getItemsInContainerById(item.uid, pokeout) for _, ui in pairs(items) do if getItemAttribute(ui, "poke"):sub(#getItemAttribute(ui, "poke")) == "." then table.insert(dat, ui) end end end if item.itemid == pokeout then if getItemAttribute(item.uid, "poke"):sub(#getItemAttribute(item.uid, "poke")) == "." then table.insert(dat, item.uid) end end end return dat end
  8. usa esse: local focus = 0 local talk_start = 0 local target = 0 local following = false local attacking = false 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', '2224'} local ultraballs = {'2220', '2227'} 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 onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then if exhaustion.get(cid, 9211) then selfSay('Please wait a few moment before asking me to heal your pokemons again!') return true end exhaustion.set(cid, 9211, 5) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) doSendMagicEffect(getThingPos(cid), 132) if isInArray(pokeballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then 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) end if isInArray(ultraballs, getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid) then 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) end local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) if #getCreatureSummons(cid) >= 1 then local jui = getCreatureSummons(cid)[1] doCreatureAddHealth(jui, getCreatureMaxHealth(jui)-getCreatureHealth(jui)) doSendMagicEffect(getThingPos(jui), 12) end local items = getItemsInContainerById(bp.uid, 2224) for _, uid in pairs(items) do local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]")) doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/"))) doTransformItem(uid, 2222) end local items = getItemsInContainerById(bp.uid, 2227) for _, uid in pairs(items) do local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]")) doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/"))) doTransformItem(uid, 2220) end local items = getItemsInContainerById(bp.uid, 2222) for _, uid in pairs(items) do local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]")) doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/"))) end local items = getItemsInContainerById(bp.uid, 2220) for _, uid in pairs(items) do local maxh = tonumber(getItemAttribute(uid, "poke"):match("/(.+)]")) doItemSetAttribute(uid, "poke", getItemAttribute(uid, "poke"):sub(1, findLetter(getItemAttribute(uid, "poke"), "[")) .. maxh .. getItemAttribute(uid, "poke"):sub(findLetter(getItemAttribute(uid, "poke"), "/"))) end selfSay('There you go! You and your pokemons are healthy again.') end end function onThink() 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) > 3 then focus = 0 end end return TRUE end
  9. é porque é pela database do player,ai só funciona com ele deslogado.
  10. criado por você? só se for esse tópico lamentável porque esses comandos já existem em 98% dos servidores a séculos -.-
  11. mais é possível sim,por causa da função "doPlayerAddMount(cid, number)" flw
  12. então é o nome do item e a descrição dele function onUse(cid, item, fromPos, itemEx, toPos) local str = ""..getItemName(item.uid).." "..getItemAttribute(item.uid,"description").."" return doCreatureSay(cid, str, TALKTYPE_MONSTER) end
  13. yeah
  14. Função para mudar a quantidade de skills ou magic level do jogador. lib/050-function function doPlayerSetSkill(cid, skill, amount) local pid = getPlayerGUID(cid) doRemoveCreature(cid,true) db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";") return TRUE end function doPlayerSetMagic(cid, amount) local pid = getPlayerGUID(cid) doRemoveCreature(cid,true) db.executeQuery("UPDATE `players` SET `maglevel` = " .. amount .. " WHERE `id` = "..pid) return TRUE end exemplo de uso
  15. rsrs curti sua magia cara bem diferente xD parabéns jhow abraços TÓPICO RECOMENDADO.
  16. o npc da "heala" enfermeira joy não funciona n?
  17. local time = 15 -- em minutos local mages = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(mages, CONDITION_PARAM_TICKS, time*60*1000) setConditionParam(mages, CONDITION_PARAM_STAT_MAGICLEVELPERCENT, 110) setConditionParam(mages, CONDITION_PARAM_BUFF, true) function onCastSpell(cid, var) return doAddCondition(cid, mages) end EDITED ---- dps que vi que o buff era pra durar 15 minutos ja arrumei ali
  18. eu não sei qual o type daquele laranja mais é assim: function onUse(cid, item, fromPos, itemEx, toPos) return doPlayerSendTextMessage(cid,18, getItemAttribute(item.uid,"description")) end lembrando tem que achar a fala da cor laranja to sem a lista aqui
  19. tenta assim: lembrando que vai depender da hr que o jogador relogar(euacho) local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local i, position = 1, 1 local added = false for _, pid in ipairs(players) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "," end t = {str} table.sort(t, function(a,b) return a<b end) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, table.concat(t, ", ")) end return TRUE end
  20. posta seu script do online ai T.T
  21. Vodkart

    Storage

    iuhsiuHSuishUIHSUIhsUIHUISHUuiS era eu ontem no msn de noite vc fico de me testar uma parada e nem testou nem te esquenta
  22. u.u mto bom seu sistema velho fera demais abraços
  23. Muito bom fera parabéns pelo seu trabalho não só nessa área de scripting como no fórum! abraços
  24. Vodkart

    Storage

    ta ai vacilão function onStepIn(cid, item, position, fromPosition) local storage1,storage2 = 1095,1075 local pos1,pos2 = {x = 157, y = 50, z = 7},{x = 160, y = 54, z = 7} if getPlayerStorageValue(cid, storage1) >= 1 then doTeleportThing(cid, pos1) elseif getPlayerStorageValue(cid, storage2) >= 1 then doTeleportThing(cid, pos2) else doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) end return TRUE end
  • Quem Está Navegando   0 membros estão online

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