
Tudo que Magonnite postou
- [v32] GlobalFull 11/12 - New Asuras, Falcons, Warzones 4,5,6 . (Updates Frequentes)
-
Spell Nova (Drain Life)
Gostei muito do seu script, tenho magias com dano tipo life drain mas elas sao meio buggadas e nao hellam, so dao dano tipo life drain msm.... vlw xD PS: organizei um pouco seu script pra ficar mais facil de editar e visualizar: PS 2: nao da bola pro cara ai que falou do portugues, nao existe a fala certa ou errada, existe a adequada para cada ocasiao e creio q a internet nao precise de uma linguagem formal hsadisdjsiajdsa setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat1, COMBAT_PARAM_AGGRESSIVE, false) setHealingFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.5, 2) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 13) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.0, -800, -1.4, -3000) local arr1= { {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,3,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, } local arr2= { {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,1,1,1,0,0,0,0}, {0,0,0,0,1,3,1,0,0,0,0}, {0,0,0,0,1,1,1,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, combat2, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 200, parameters) return TRUE end
-
Itens Editados
Não pois o script cria uma ID propria, por exemplo a prieira arma editada tem ID 100, se eu usar /i 100 vai criar um vácuo no chao hahahaha pq o /i utiliza os IDs dos itens normais. Se eu colocar uma ID q n existe nos itens normais para tentar o /i tbm n adianta, pq o /i pega apenas os itens do itens.xml e nao os do newitens.xml E me desculpe por prolongar o tópico.. nao foi intencional mas ainda eh o mesmo assunto.
-
Itens Editados
Obrigado xD e se n for pedir muito eu tbm gostaria de um comando para GOD semelhante ao /i para criar itens novos :D
-
Itens Editados
Olá, este é meu primeiro tópico aqui, então perdoem algum erro. Bom, recentemente encontrei aqui no forum scripts para adicionar no server itens novos com o mesmo sprite e sem criar um novo cliente. Eu deveria adicionar esse script "newitems.xml" em data/items : <?xml version="1.0" encoding="UTF-8"?> <items> <item id="100" spriteid="2400" article="a" name="magic edited sword"> <attribute key="description" value="Arma editada." /> <attribute key="defense" value="45" /> <attribute key="attack" value="100" /> <attribute key="elementIce" value="34"/> <attribute key="extradef" value="10" /> <attribute key="extraatk" value="10" /> </item> <item id="101" spriteid="2472" article="a" name="master plate armor"> <attribute key="description" value="Armor editada." /> <attribute key="armor" value="19" /> </item> <item id="102" spriteid="2386" article="a" name="Viking Axe"> <attribute key="description" value="a fucking viking axe." /> <attribute key="defense" value="15" /> <attribute key="attack" value="60" /> <attribute key="weaponType" value="axe" /> <attribute key="extradef" value="1" /> <attribute key="extraatk" value="1" /> <attribute key="weight" value="4000" /> </item> <item id="103" spriteid="2512" article="a" name="Viking Shield"> <attribute key="description" value="a fucking viking shield." /> <attribute key="weight" value="4000" /> <attribute key="defense" value="38" /> <attribute key="weaponType" value="shield" /> </item> </items> E esse script como ItemsEditedLib.lua em data/lib function doPlayerAddEditedItem(cid, itemid) local newxml = io.open("data/items/newitems.xml", "r") local configs = {} for i in newxml:read("*a"):gmatch("<item (.-)</item>") do local itemid = tonumber(i:match('id="(.-)"')) local itemconfig = { ["spriteid"] = tonumber(i:match('spriteid.-=.-"(.-)"')), ["article"] = i:match('article.-=.-"(.-)"'), ["name"] = i:match('name.-=.-"(.-)"'), ["description"] = i:match('key.-=.-"description".-value.-=.-"(.-)"'), ["defense"] = tonumber(i:match('key.-=.-"defense".-value.-=.-"(.-)"')), ["attack"] = tonumber(i:match('key.-=.-"attack".-value.-=.-"(.-)"')), ["extradefense"] = tonumber(i:match('key.-=.-"extradef".-value.-=.-"(.-)"')), ["armor"] = tonumber(i:match('key.-=.-"armor".-value.-=.-"(.-)"')), ["extraattack"] = tonumber(i:match('key.-=.-"extraatk".-value.-=.-"(.-)"')), } configs[itemid] = itemconfig end if configs[itemid] then local item = doPlayerAddItem(cid, configs[itemid].spriteid) for i,x in pairs(configs[itemid]) do doItemSetAttribute(item, i, x) end end end Eu sou leigo em scripts, infelizmente, então o com o pouco que sei consigo apenas copiar e editar os q encontro na net xD Para colocar esses novos itens no jogo eu editei esse npc: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 FUNCAO_NOME(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if getPlayerItemCount(cid,2516) >= 1 then -- SE TIVER 1 OU MAIS ITEM COM ID 2516 if doPlayerRemoveItem(cid,2516,1) then -- remove 1 ITEM DO ITEM COM ID 2516 npcHandler:say('Here is your item!', cid) -- MENSAGEM AO REMOVER O ITEM doPlayerAddItem(cid,5908,1) -- ADD 1 ITEM COM ID 5908 end else npcHandler:say('You don\'t have these items!', cid) end end local node2 = keywordHandler:addKeyword({'teste'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'vocÊ quer testar a função desse script?'}) node2:addChildKeyword({'yes'}, FUNCAO_NOME, {npcHandler = npcHandler, onlyFocus = true, reset = true}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Até mais.', reset = true}) npcHandler:addModule(FocusModule:new()) para isso: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 FUNCAO_NOME(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if getPlayerItemCount(cid,2160) >= 200 then -- SE TIVER 1 OU MAIS ITEM COM ID 2516 if doPlayerRemoveItem(cid,2160,200) then -- remove 1 ITEM DO ITEM COM ID 2516 npcHandler:say('Here is your item!', cid) -- MENSAGEM AO REMOVER O ITEM doPlayerAddEditedItem(cid,102,1) -- ADD 1 ITEM COM ID 5908 end else npcHandler:say('Voce nao tem 200 mangos - crystal coins!', cid) end end function FUNCAO_SHIELD(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if getPlayerItemCount(cid,2160) >= 200 then -- SE TIVER 1 OU MAIS ITEM COM ID 2516 if doPlayerRemoveItem(cid,2160,200) then -- remove 1 ITEM DO ITEM COM ID 2516 npcHandler:say('Here is your item!', cid) -- MENSAGEM AO REMOVER O ITEM doPlayerAddEditedItem(cid,103,1) -- ADD 1 ITEM COM ID 5908 end else npcHandler:say('Voce nao tem 200 mangos - crystal coins!', cid) end end local node2 = keywordHandler:addKeyword({'viking axe'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Um Viking Axe, custa 200 mangos?'}) node2:addChildKeyword({'yes'}, FUNCAO_NOME, {npcHandler = npcHandler, onlyFocus = true, reset = true}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Até mais.', reset = true}) local node3 = keywordHandler:addKeyword({'viking shield'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Um Viking Shield, custa 200 mangos?'}) node3:addChildKeyword({'yes'}, FUNCAO_SHIELD, {npcHandler = npcHandler, onlyFocus = true, reset = true}) node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Até mais.', reset = true}) npcHandler:addModule(FocusModule:new()) e consegui finalmente colocar os itens no jogo. Porém, com esses scripts apenas estou muito limitado. Eu queria saber: -- como coloco os itens para serem comercializados em uma "janela de trade" como os npcs normalmente fazem. -- como colocar esses novos itens de loot dos monstros. -- como colocar os itens numa quest. -- como criar potions novas (que de mais skills como a Berserk Potion) -- como criar wands e rods novas. -- como fazer as novas profissoes que criei conseguirem beber as potions como a Strong Healing Potion. Agradeço desde já :D (E agradeço ao EddyHavoc pelo script dos itens, nao sei se ele criou ou conseguiu na net também, e ao luanluciano93 pelo NPC de quests, e também nao sei dizer se ele criou)