-
Total de itens
631 -
Registro em
-
Última visita
-
Dias Ganhos
13
Tudo que jhon992 postou
-
Acho que me confundi, no spellName poem "light healing", pra testar. @XxJapanxX, com storage da pra fazer tbm, mais seria mais complicado colocar storage em todas as spells. Não é tão complicado, mais é mais complicado que colocar para receber a spell com a função doPlayerLearnInstantSpell(cid, spellName) .
-
Digamos que não seja imposivel, mais é extremamente complicado. Primeiro ocê precisa de todas as sprites de montarias do tibia 9.1, depois precisa colocar todas essas sprites no seu client 8.6, vou calcular +ou- por cima quantas sprites são: cada outfit tem 12 sprites, são 10 outfits, então vaum ser 120 sprites de outfits montados nos monstros mais umas 120 sprites de monstros de montaria. Depois de adicionar todas você vai ter que criar muitos scripts de funções, para criação de comandos, adicionar e remover montarias e varios outros scripts.
-
Ta arrumado la emcima jah, para lvl.
-
@Subwat, reportado por flood. Não é a primeira vez que vejo tu floodando topicos dessa maneira para ganhar mais posts, sendo que qualquer um pode entender oque esse usuario quer, e mesmo depois do usuario explicar melhor você não atende seu pedido. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @leonvenigor, o script do npc vai ficar assim: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local itemNeed = { -- itens que precisa para completar a troca {itemid = 1234, quant = 10}, -- id do item, quantidade } local spellName = "Light" -- nome da spell que aprendera, os nomes das spells se encontrar no arquivo spells.xml local lvlNeed = 8 -- lvl necessario para fazer a quest. 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 if msgcontains(msg, 'trocar') then selfSay('Você deseja trocar '.. itemNeed[1].quant ..''.. getItemNameById(itemNeed[1].itemid) ..', pela spell' .. spellName ..'.', cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') then if getPlayerLevel(cid) < lvlNeed then selfSay('Você não possui level necessario.', cid) return true end for i=1, #itemNeed do if getPlayerItemCount(cid, itemNeed[i].itemid) < itemNeed[i].quant then selfSay('Você não possui os item necessarios para troca.', cid) return true end end for i=1, #itemNeed do doPlayerRemoveItem(cid, itemNeed[i].itemid, itemNeed[i].quant) end doPlayerLearnInstantSpell(cid, spellName) selfSay('Você aprendeu a spell'.. spellName ..'.', cid) else selfSay('Você não deseja {trocar}?', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
[ Irregular ]Extreme-Global.servegame.com
tópico respondeu ao bielfaisca14 de jhon992 em Lixeira Pública
#Repotado area errada e double tópico, essa area é para divulgação de equipe, não divulgação de otserv. -
[Actions, Talkactions] Não Usar O Dance System Em Cima De Uma Actions
pergunta respondeu ao kelvinvictor de jhon992 em Scripts
Isso resolvera seu problema. Em data/movements/movements.xml cole as tags: <movevent type="StepIn" actionid="25000" event="script" value="tiledance.lua"/> <movevent type="StepOut" actionid="25000" event="script" value="tiledance.lua"/> Duplica um arquivo em data/movements/scripts e nomeia para "tiledance" sem as aspas e nele cole: function onStepIn(cid, item, pos) if (getPlayerStorageValue(cid, 302124) > 0) then doPlayerSendTextMessage(cid, 22, "Você não pode subir com dancing system ativado.") return false end setPlayerStorageValue(cid, 302123, 1) return TRUE end function onStepOut(cid, item, pos) setPlayerStorageValue(cid, 302123, 0) return TRUE end Agora em talkactions/scripts, troque seu arquivo "dancing.lua" por esse: local conf = {} -- // config // --- conf.danceTexts = {"GO GO DANCE!", "DANCE NOW!", "DANCE IS FUNY!"} conf.textSpeed = 1500 -- how fast animated texts is sending? conf.danceSpeed = 100 -- dance speed conf.outfitSpeed = 250 -- outfit changer speed conf.outfitMale = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325} -- all male outfits conf.outfitFemale = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324} -- all female outfits -- // end // -- function dancer(tab) if isPlayer(tab[1]) then local dirs = {[0] = {1,3},[1] = {0,2},[2] = {1,3},[3] = {0,2}} local look = dirs[getCreatureLookDirection(tab[1])] doCreatureSetLookDir(tab[1], look[math.random(1,2)]) tab[2].dancer = addEvent(dancer,conf.danceSpeed, {tab[1], tab[2]}) end end function messager(tab) if isPlayer(tab[1]) then doCreatureSay(tab[1], conf.danceTexts[math.random(1, #conf.danceTexts)], TALKTYPE_ORANGE_2) tab[2].messager = addEvent(messager,conf.textSpeed, tab) end end function outfitChanger(tab) if isPlayer(tab[1]) then if getPlayerSex(tab[1]) == PLAYERSEX_FEMALE then outs = conf.outfitFemale else outs = conf.outfitMale end local outfit = { lookType = outs[math.random(1, #outs)], lookHead = math.random(1,133), lookBody = math.random(1,133), lookLegs = math.random(1,133), lookFeet = math.random(1,133), lookTypeEx = math.random(1,133), lookAddons = math.random(0,3)} doCreatureChangeOutfit(tab[1], outfit) tab[2].outfitChanger = addEvent(outfitChanger,conf.outfitSpeed, tab) end end backOutfit = {} local backOutfit = {} function onSay(cid, words, param, channel) local pid = getPlayerGUID(cid) if type(events[pid]) ~= "table" then events[pid] = {} end if (getPlayerStorageValue(cid, 302123) > 0) then doPlayerSendTextMessage(cid, 22, "Você não pode ativar o dancing system no trainer.") return true end if string.lower(param) == "start" and not(events[pid].dancer) then outBack = getCreatureOutfit(cid) backOutfit[pid] = outBack backOutfit[pid].lookType = outBack.lookType backOutfit[pid].lookAddons = outBack.lookAddons dancer({cid, events[pid]}) messager({cid, events[pid]}) outfitChanger({cid, events[pid]}) setPlayerStorageValue(cid, 302124, 1) elseif string.lower(param) == "stop" and events[pid].dancer then stopEvent(events[pid].dancer) stopEvent(events[pid].messager) stopEvent(events[pid].outfitChanger) events[pid] = {} doCreatureChangeOutfit(cid, backOutfit[pid]) setPlayerStorageValue(cid, 302124, 0) end return TRUE end -
Sistema atualizado com compra de itens por pontos de reputação -> http://www.xtibia.com/forum/topic/173892-creaturescript-simple-reputation-system/page__fromsearch__1
-
[Creaturescript] Simple Reputation System !
tópico respondeu ao jhon992 de jhon992 em Globalevents e Spells
@melocom, ja adaptei sua ideia no script. Só ir na primeira página e copiar a parte de Comprar determinado item com Pontos de Reputação. -
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'} local greatballs = {'2651', '2657'} local superballs = {'2653', '2658'} local saffariballs = {'2655', '2659'} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay("Good bye!", cid) 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') and getDistanceToCreature(cid) <= 3 then selfSay("Diga heal para healar seu pokemon!", cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msgcontains(msg, 'heal') 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!", cid) 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 if isInArray(greatballs, 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, 2651) end if isInArray(superballs, 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, 2653) end if isInArray(saffariballs, 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, 2655) 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), 132) 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, 2657) 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, 2651) end local items = getItemsInContainerById(bp.uid, 2658) 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, 2653) end local items = getItemsInContainerById(bp.uid, 2659) 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, 2655) 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 local items = getItemsInContainerById(bp.uid, 2651) 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, 2653) 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, 2655) 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.", cid) end 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
-
Reporta para moderação clicando em "Denunciar" que eles moverão para area certa.
-
[Creaturescript] Simple Reputation System !
tópico respondeu ao jhon992 de jhon992 em Globalevents e Spells
ashudahu, foi msm nem tinha percebido. Vlw aew. -
Cria um npc e poem esse código nele: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local itemNeed = { -- itens que precisa para completar a troca {itemid = 1234, quant = 5}, -- id do item, quantidade {itemid = 4352, quant = 3}, {itemid = 9876, quant = 100}, {itemid = 6719, quant = 15} } local itemGain, quantGain = 2160, 10 -- item que ganhara ao fim da troca 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 if msgcontains(msg, 'trocar') then selfSay('Você deseja trocar '.. itemNeed[1].quant ..''.. getItemNameById(itemNeed[1].itemid) ..', '.. itemNeed[2].quant ..''.. getItemNameById(itemNeed[2].itemid) ..', '.. itemNeed[3].quant ..''.. getItemNameById(itemNeed[3].itemid) ..', '.. itemNeed[4].quant ..''.. getItemNameById(itemNeed[4].itemid) ..', por' .. quantGain ..''.. getItemNameById(itemGain) ..'.', cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') then for i=1, #itemNeed do if getPlayerItemCount(cid, itemNeed[i].itemid) < itemNeed[i].quant then selfSay('Você não possui os item necessarios para troca.', cid) return true end end for i=1, #itemNeed do doPlayerRemoveItem(cid, itemNeed[i].itemid, itemNeed[i].quant) end doPlayerAddItem(cid, itemGain, quantGain) selfSay('A troca esta completa.', cid) else selfSay('Você não desja {trocar}?', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
taum pq tu n tem mais effects adicionado, olha no arquivo 000-constant na pasta data/lib do seu ot. os effects começam com "CONST_ME" e terminam com o numero do efeito. Exemplos: CONST_ME_STEPSHORIZONTAL = 62 CONST_ME_BLOODYSTEPS = 63 CONST_ME_STEPSVERTICAL = 64 CONST_ME_YALAHARIGHOST = 65
-
Sóh trocar o max pelo numero maximo. function onSay(cid, words, param, channel) param = tonumber(param) local max = 150 -- numero maximo if(not param or param < 0 or param > max) then doPlayerSendCancel(cid, "Numeric param may not be lower than 0 and higher than " .. max .. ".") return true end doSendMagicEffect(getCreaturePosition(cid), param) return true end
-
Relacionado ao programa que criar monstro, eu estou fazendo um para disponibilizar. Assim que a versão beta estiver pronta eu lanço aqui no xtibia. =) Olha a img, pra ter noção como ta ficando:
-
actionid = 1030 -- porta de lvl 30+ actionid = 10100 -- porta lvl 100+ ...
-
data/talkactions/scripts, duplica um nomeia para "tp_player" sem as aspas e nele cole: function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") if #t ~= 4 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Param invalid.") return true end local player = getPlayerByNameWildcard(tostring(t[1])) local postp = {x=tonumber(t[2]), y=tonumber(t[3]), z=tonumber(t[4])} local effect = 30 if(not isPlayer(player)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.") return true end doTeleportThing(player, postp) doSendMagicEffect(getCreaturePosition(player), effect) return true end agora em talkactions.xml cole a tag: <talkaction log="yes" words="/go" access="4" event="script" value="tp_player.lua"/> Fiz rapidinho e nem testei, qualquer erro me fala.
-
Pra arrumar a arrow, troca aquilo por isso: function onUse(cid, item, fromPosition, itemEx, toPosition) local arrow_ids = {7838,7839,7840} -- coloque os ids da arrows aqui. if item.itemid == arrow_ids[#arrow_ids] then doTransformItem(item.uid, item.itemid+1) doSendMagicEffect(getThingPos(cid), 28) -- troque o 28 pelo efeito desejado else doTransformItem(item.uid, arrow_ids[1]) return TRUE end ------------------------- No ring o esquema é o que eu te falei, aqui funciona certinho. Configurei pro Ring of the Sky. Verifica se o nome do arquivo ta "bangle_ring" certinho, e cola: local cointype = 2123 local tbcw = 2000 local ncws = 0 local ncni = 0 local stcn = 1 local warn = 0 local cwar = 0 local bmaineff = CONST_ME_YELLOW_RINGS local bsecondeff = CONST_ME_BLOCKHIT local bflingeff = CONST_ANI_SMALLHOLY local blandeff = CONST_ME_HOLYAREA local bringwaste = CONST_ME_FIREWORK_YELLOW local bringabsorb = CONST_ME_MAGIC_GREEN local gmaineff = CONST_ME_EXPLOSIONAREA local gsecondeff = CONST_ME_FIREAREA local gflingeff = CONST_ANI_FIRE local glandeff = CONST_ME_FIREWORK_RED local gringwaste = CONST_ME_FIREWORK_RED local gringabsorb = CONST_ME_MAGIC_RED -- Small config section << -- local condition1 = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition1, CONDITION_PARAM_TICKS, -1) setConditionParam(condition1, CONDITION_PARAM_SKILL_FIST, 210) setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 210) setConditionParam(condition1, CONDITION_PARAM_SKILL_CLUB, 210) setConditionParam(condition1, CONDITION_PARAM_SKILL_SWORD, 210) setConditionParam(condition1, CONDITION_PARAM_SKILL_AXE, 210) setConditionParam(condition1, CONDITION_PARAM_SKILL_DISTANCE, 210) setConditionParam(condition1, CONDITION_PARAM_SKILL_SHIELD, 210) setConditionParam(condition1, CONDITION_PARAM_SKILL_FISHING, 210) setConditionParam(condition1, CONDITION_PARAM_STAT_MAGICPOINTS, 210) setConditionParam(condition1, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 215) setConditionParam(condition1, CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 210) local condition2 = createConditionObject(CONDITION_HASTE) setConditionParam(condition2, CONDITION_PARAM_TICKS, -1) setConditionFormula(condition2, 2.5, 0, 3.0, 0) function superform1(param) if param.crca == 1 then local pos = getCreaturePosition(param.cid) local sex = getPlayerSex(param.cid) local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255} local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255} local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255} local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255} local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255} local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255} local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255} local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255} doSendMagicEffect(pos, bmaineff) doSendMagicEffect(pos, bsecondeff) doSendDistanceShoot(pos, nha, bflingeff) doSendDistanceShoot(pos, sha, bflingeff) doSendDistanceShoot(pos, wha, bflingeff) doSendDistanceShoot(pos, eha, bflingeff) doSendDistanceShoot(pos, nwa, bflingeff) doSendDistanceShoot(pos, nea, bflingeff) doSendDistanceShoot(pos, sea, bflingeff) doSendDistanceShoot(pos, swa, bflingeff) doSendMagicEffect(nha, blandeff) doSendMagicEffect(sha, blandeff) doSendMagicEffect(wha, blandeff) doSendMagicEffect(eha, blandeff) doSendMagicEffect(nwa, blandeff) doSendMagicEffect(nea, blandeff) doSendMagicEffect(sea, blandeff) doSendMagicEffect(swa, blandeff) doAddCondition(param.cid, condition1) doAddCondition(param.cid, condition2) local mhp = getCreatureMaxHealth(param.cid) local mma = getPlayerMaxMana(param.cid) local chp = getCreatureHealth(param.cid) local cma = getPlayerMana(param.cid) local dhp = mhp - chp local dma = mma - cma doCreatureAddHealth(param.cid, dhp) doCreatureAddHealth(param.cid, -(getCreatureMaxHealth(param.cid)/2)) doPlayerAddMana(param.cid, dma) doPlayerAddMana(param.cid, -(getPlayerMaxMana(param.cid)/2)) doPlayerRemoveItem(param.cid, cointype, ncni) param.crcb = 1 param.sex = sex setPlayerStorageValue(param.cid, 50780, 1) addEvent(superform2, 1, param) end end function superform2(param) if param.crca == 1 and param.crcb == 1 and isCreature(param.cid) == TRUE and getPlayerStorageValue(param.cid, 50780) == 1 then local pos = getCreaturePosition(param.cid) doPlayerRemoveItem(param.cid, cointype, ncws) if param.sex == 1 then doSendMagicEffect(pos, bringwaste) doSendMagicEffect(pos, bringabsorb) else doSendMagicEffect(pos, gringwaste) doSendMagicEffect(pos, gringabsorb) end local goldleft = getPlayerItemCount(param.cid, cointype) if goldleft < ncws then param.crca = 0 param.crcb = 0 setPlayerStorageValue(param.cid, 50780, 0) local pos = getCreaturePosition(param.cid) local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255} local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255} local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255} local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255} local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255} local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255} local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255} local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255} doRemoveCondition(param.cid, CONDITION_OUTFIT) doRemoveCondition(param.cid, CONDITION_ATTRIBUTES) doRemoveCondition(param.cid, CONDITION_HASTE) doSendMagicEffect(pos, bmaineff) doSendMagicEffect(pos, bsecondeff) doSendDistanceShoot(pos, nha, bflingeff) doSendDistanceShoot(pos, sha, bflingeff) doSendDistanceShoot(pos, wha, bflingeff) doSendDistanceShoot(pos, eha, bflingeff) doSendDistanceShoot(pos, nwa, bflingeff) doSendDistanceShoot(pos, nea, bflingeff) doSendDistanceShoot(pos, sea, bflingeff) doSendDistanceShoot(pos, swa, bflingeff) doSendMagicEffect(nha, blandeff) doSendMagicEffect(sha, blandeff) doSendMagicEffect(wha, blandeff) doSendMagicEffect(eha, blandeff) doSendMagicEffect(nwa, blandeff) doSendMagicEffect(nea, blandeff) doSendMagicEffect(sea, blandeff) doSendMagicEffect(swa, blandeff) else addEvent(superform2, tbcw, param) end end end function onEquip(cid, item, slot) local param = {cid = cid, item = item, slot = slot} local gold = getPlayerItemCount(cid, cointype) if gold >= stcn then param.crca = 1 --can equip here? addEvent(superform1, 1, param) return TRUE end end function onDeEquip(cid, item, slot) if isPlayer(cid) and getPlayerStorageValue(cid, 50780) == 1 then doRemoveCondition(cid, CONDITION_OUTFIT) doRemoveCondition(cid, CONDITION_ATTRIBUTES) doRemoveCondition(cid, CONDITION_HASTE) local pos = getCreaturePosition(cid) setPlayerStorageValue(cid, 50780, 0) local sex = getPlayerSex(cid) local nha = {x = pos.x, y = pos.y - 3, z = pos.z, stackpos = 255} local sha = {x = pos.x, y = pos.y + 3, z = pos.z, stackpos = 255} local wha = {x = pos.x - 3, y = pos.y, z = pos.z, stackpos = 255} local eha = {x = pos.x + 3, y = pos.y, z = pos.z, stackpos = 255} local nwa = {x = pos.x - 2, y = pos.y - 2, z = pos.z, stackpos = 255} local nea = {x = pos.x + 2, y = pos.y - 2, z = pos.z, stackpos = 255} local sea = {x = pos.x + 2, y = pos.y + 2, z = pos.z, stackpos = 255} local swa = {x = pos.x - 2, y = pos.y + 2, z = pos.z, stackpos = 255} doSendMagicEffect(pos, bmaineff) doSendMagicEffect(pos, bsecondeff) doSendDistanceShoot(pos, nha, bflingeff) doSendDistanceShoot(pos, sha, bflingeff) doSendDistanceShoot(pos, wha, bflingeff) doSendDistanceShoot(pos, eha, bflingeff) doSendDistanceShoot(pos, nwa, bflingeff) doSendDistanceShoot(pos, nea, bflingeff) doSendDistanceShoot(pos, sea, bflingeff) doSendDistanceShoot(pos, swa, bflingeff) doSendMagicEffect(nha, blandeff) doSendMagicEffect(sha, blandeff) doSendMagicEffect(wha, blandeff) doSendMagicEffect(eha, blandeff) doSendMagicEffect(nwa, blandeff) doSendMagicEffect(nea, blandeff) doSendMagicEffect(sea, blandeff) doSendMagicEffect(swa, blandeff) end return TRUE end Nas tags no movements.xml cola: <movevent type="Equip" itemid="2123" slot="ring" event="script" value="bangle_ring.lua"/> <movevent type="DeEquip" itemid="2123" slot="ring" event="script" value="bangle_ring.lua"/> E verifica se não tem mais nada do ring of the sky executando no movements.xml, basta procura pelo itemid 2123, se tiver outras tags, apague-as. Obs: esse ring não deixa tu com esses 140%, ele aumenta o life um tanto. Depois que tu testar tu vê se gosta ou não. --------------------------
- 13 respostas
-
- pet sistem
- multi arrow
- (e 6 mais)
-
Não fiz o script para ser aplicado em qualquer ot, fiz para ots que procuram inovação. Como no teu exemplo kina com 2 magic hita 600 e o pally 400, basta almentar o atack das bolts para solucionar isso... Funciona sem weapons tbm, soma os hits das duas mãos. mais jah que os ataques das mão são de 0, vai bater usando sóh o skill. Apliquei o script em um otserv onde tem uma vocação que usa gloves como item de atack para first.
-
(Pedido) Como colocar uma Auto-Mensagem na cor verde?
pergunta respondeu ao MarcioSkate22 de jhon992 em Scripts
Duplica um arquivo na pasta data/globalevents/scripts e nomeia para "msg" sem as aspas e nele cole o código ali de cima. E no arquivo globalevents.xml cole a tag: <globalevent name="msg" interval="900" event="script" value="msg.lua"/> -
Tens que criar uma cidade com seu mapa editor. E depois no config.lua de seu otserv ageite essa linha: newPlayerTownId = 1 Vai ser o id da cidade onde o novo player vai pertencer.
-
A arrows faiz assim oh, Vai em data/actions/scripts, duplica um arquivo e nomeia para "arrow_change" sem as aspas e nele cole: function onUse(cid, item, fromPosition, itemEx, toPosition) local arrow_ids = {7838,7839,7840} -- coloque os ids da arrows aqui. doTransformItem(item.uid, arrow_ids[math.random(1,#arrow_ids)]) doSendMagicEffect(getThingPos(cid), 28) -- troque o 28 pelo efeito desejado return TRUE end Agora em actions.xml a tag: <action itemid="7838;7839;7840" event="script" value="arrow_change.lua"/> Pra editar, sóh adicionar novas arrow_ids no script e na tag.
- 13 respostas
-
- pet sistem
- multi arrow
- (e 6 mais)
-
@ForeverTobi, claro que tenho conhecimento oque faz cada coisa que eu fiz no meu código, só desconheço é das outras funções necessarias para desenvolver os códigos de quem pede. Não posso fazer nada se tu acha que eu fiz ripping, não sei se é inveja sua ou algo do tipo, só sei que você não precisava floodar o topico com comentarios desnecessarios e sem fundamento. Não me importo com os scripts que você fez, não vou ficar comentando neles que acho que é ripping ou coisa do tipo, cada um cuida da sua vida. Tenho a conciencia limpa e sei que não fiz ripping de nada e te negativei por razão. E ja pedir para você parar de floodar o topico com informação inutel, que discutir mais meu msn ta no meu perfil...
-
Acho que esse problema é de configuração no config.lua, procure por idleWarningTime e idleKickTime no meu otserv esta assim: idleWarningTime = 14 * 60 * 1000 idleKickTime = 15 * 60 * 1000 O ring funciona perfeitamente aqui, você que deve ter errado algo na configuração. O amuleto, vai no amuleto que você escolheu no seu arquivo itens.xml e poem essa tag nele: <attribute key="preventDrop" value="1" /> O PetSystem tbm funciona perfeitamente.
- 13 respostas
-
- pet sistem
- multi arrow
- (e 6 mais)
-
to meio desatento hj, esqueci uma virgula nessa linha: loot = false, -- se ao morrer o jogador irá perder o loot É a linha de numero 7 no arquivo amulet_protection.lua, só adicionar a virgula depois do false.
- 13 respostas
-
- pet sistem
- multi arrow
- (e 6 mais)
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.