

Ilidian
Campones-
Total de itens
51 -
Registro em
-
Última visita
Tudo que Ilidian postou
-
poketibia Recruto Equipe, Trabalho Remunerado! $$$
tópico respondeu ao adminmuzao de Ilidian em Lixeira Pública
Se ainda precisar de um, sou scripter. O problema é que não uso msn. Se quiser, pode add no skype (vitor.rr) ou mandar mensagem pelo fórum mesmo. -
Estranho funcionar certinho com mana e bugar com hp... de qualquer forma, tenta isso: --[[ Script by 10% Vodkart and 90% Devilmoon ]]-- --[[ para o Xtibia.com ]]-- function onSay(cid, words, param) if(words == "/addmana") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) mana = getCreatureMana(player)+quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return true end setCreatureMaxMana(player, mana) doCreatureAddMana(player, getCreatureMaxMana(player)) doPlayerSendTextMessage(player, 19, "Foram adicionados "..quanty.." de mana do seu character agora você tem " .. getCreatureMana(cid) .. "/" .. getCreatureMaxMana(cid) .. " de Mana.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você adicionou "..quanty.." de mana ao jogador " .. t[1] .. " ") elseif(words == "/delmana") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) mana = getCreatureMana(player)-quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return true end setCreatureMaxMana(player, mana) doCreatureAddMana(player, getCreatureMaxMana(player)) doPlayerSendTextMessage(player, 19, "Foram removidos "..quanty.." de mana do seu character agora você tem " .. getCreatureMana(cid) .. "/" .. getCreatureMaxMana(cid) .. " de Mana.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você Removeu "..quanty.." de mana do jogador " .. t[1] .. " ") elseif(words == "/addhp") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) health = getCreatureMaxHealth(player)+quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return true end setCreatureMaxHealth(player, getCreatureMaxHealth(player) + quanty) doCreatureAddHealth(player, getCreatureMaxHealth(player)) doPlayerSendTextMessage(player, 19, "Foram adicionados "..quanty.." de hp do seu character agora você tem " .. getCreatureHealth(cid) .. "/" .. getCreatureMaxHealth(cid) .. " de HP.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você adicionou "..quanty.." de health do jogador " .. t[1] .. " ") elseif(words == "/delhp") then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local player = getPlayerByName(t[1]) local quanty = t[2] local pid = getPlayerByNameWildcard(t[1]) health = getCreatureHealth(player)-quanty if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return true end setCreatureMaxHealth(player, health) doCreatureAddHealth(player, getCreatureMaxHealth(player)) doPlayerSendTextMessage(player, 19, "Foram Removidos "..quanty.." de hp do seu character agora você tem " .. getCreatureHealth(cid) .. "/" .. getCreatureMaxHealth(cid) .. " de HP.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você Removeu "..quanty.." de health do jogador " .. t[1] .. " ") end return true end
-
Você não deve saber muito de script... Obvio que algo como isso: "getPlayerVocation(5)" não vai funcionar. Topico: Dei uma organizada no teu script mas não achei nada de errado nele... Seria bom você falar qual o problema com o script. Aparece algum erro no console? Enfim, se quiser o script + organizado, ta ae. function onSay(cid, words, param) local config = { level = 50000, -- level para resetar RemainingLvl = 1000, -- level que ficara depois do reset exper = 10000, -- Experiência que ficara depois do Reset pid = getPlayerGUID(cid), -- Não Mecha skull = "no", -- Players com Skull podem resetar "yes" para sim e "no" para não redskull = "no", -- Players com Red Skull podem resetar "yes" para sim e "no" para não prot = "yes", -- precisa estar em area pz para resetar "yes" para sim e "no" para não bat = "yes", -- player com fight pode resetar "yes" para sim e "no" para não voc = getPlayerVocation(cid), -- Não mecha mana = 1000, -- mana que ficara após o reset health = 1000 -- Health que ficara após o reset } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid, 24, "apenas players sem white skull podem resetar.") return true end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"apenas player sem red skull podem resetar.") return true end if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder resetar.") return true end if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder resetar.") return true end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 1 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 5) -- Vocação que o player ficara após o reset end doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper..",`manamax` = "..config.mana..",`healthmax` = "..config.health..",`health` = "..config.health..",`mana` = "..config.mana.." WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "Você precisa do level "..config.level.." ou mais para resetar.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end
-
Eu posso usar o Windows 2003 Standard Edition R2 x64 ou o Windows 7 professional x64 qual seria a melhor opção para hostear um servidor?
-
data/talkactions/scripts/newtype.lua:1 ^ Ta dizendo que o problema esta na primeira linha do seu script. A primeira linha do seu script parece que esta em branco (ou é o forum que deixa esse espaço), de qualquer forma, se a primeira linha for essa: function onSay(cid, words, param), não tem nada de errado com ela... Parece que existe algum simbolo loco em uma dessas linhas e é isso que faz o seu script bugar, da uma olhada se vc não consegue apagar qualquer "espaço em branco" que vc achar nessas 2 linhas.
-
Tenta agora: <?xml version="1.0" encoding="UTF-8"?> <monster name="master druid" nameDescription="a master druid" race="blood" experience="20050" speed="330" manacost="0"> <health now="18500" max="18500"/> <look type="130" head="0" body="114" legs="76" feet="132" corpse="10569"/> <targetchange interval="5000" chance="10"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="0"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="1000" skill="90" attack="75"/> <attack name="lifedrain" interval="1000" chance="13" radius="4" target="0" min="-160" max="-287"> <attribute key="areaEffect" value="mortarea"/> </attack> <attack name="fire" interval="3000" chance="44" range="7" radius="2" target="1" min="-120" max="-300"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="fireattack"/> </attack> <attack name="energy" interval="3000" chance="52" range="7" radius="2" target="1" min="-120" max="-200"> <attribute key="shootEffect" value="energyy"/> <attribute key="areaEffect" value="purpleenergy"/> </attack> <attack name="earth" interval="3000" chance="22" range="7" radius="2" target="1" min="-220" max="-500"> <attribute key="shootEffect" value="earth"/> <attribute key="areaEffect" value="bigplants"/> </attack> </attacks> <defenses armor="35" defense="25"> <defense name="healing" interval="1000" chance="50" min="255" max="355"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="invisible" interval="4000" chance="120" duration="9000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <element> <element firePercent="25"/> <element earth="40"/> <element holyPercent="-20"/> <element energyPercent="20"/> <element deathPercent="20"/> </elements> <immunities> <immunity physical="0"/> <immunity energy="0"/> <immunity fire="0"/> <immunity ice="0"/> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity outfit="1"/> <immunity drunk="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="energy elemental" interval="2000" chance="40" max="2"/> </summons> <voices interval="5000" chance="30"> <voice sentence="SOU O BIXO DO EVENTO!"/> <voice sentence="HAHAHAHAHAHA"/> <voice sentence="ENTREM AE NEWOT"/> <voice sentence="Bem Vindo ao EVENTO DE ITEM VIP DO NEWOT!"/> <voice sentence="He He He!"/> <voice sentence="VENHA PARA NOSSO OT 24 HORAS!"/> <voice sentence="ADRIANO EU VO COMER SEU BOLO"/> <voice sentence="MUAHAHAHAHAHA!"/> </voices> <loot> <item id="2148" countmax="40" chance1="100000" chancemax="0"/> --Gold Coin <item id="2260" chance="10000"/> --Blank Rune <item id="2417" chance="5000"/> --Battle Hammer <item id="2513" chance="1000"/> --Battle Shield <item id="6570" chance="5538"/> --Blue Surprise Bag <item id="6571" chance="1538" /> --Red Surprise Bag <item id="2515" chance="5000"/> --Guardian Shield </loot> </monster>
-
Fazer o seguinte, me fala exatamente oque você quer que o npc faça que eu monto ele do zero pra você. Fica muito mais facil assim...
-
Testei esse aqui em casa e deu certo, da uma olhada: 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 creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if (msgcontains(msg, "hello") or msgcontains(msg, "hi")) and not npcHandler:isFocused(cid) then if getCreatureHealth(cid) < 65 then npcHandler:say("Hello, "..getCreatureName(cid).."! You are looking really bad. Let me heal your wounds.", cid) doCreatureAddHealth(cid, 65 - getCreatureHealth(cid)) doSendMagicEffect(getCreaturePosition(cid), 12) npcHandler:addFocus(cid) else selfSay("Hello, "..getCreatureName(cid).."! I'll {heal} you if you are badly injured or poisoned. Feel free to ask me for {help} or general {hints}.", cid) npcHandler:addFocus(cid) end end if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "bye") or msgcontains(msg, "farewell") then selfSay("Farewell, " .. getCreatureName(cid) .. "!", cid) npcHandler:releaseFocus(cid) elseif msgcontains(msg, 'heal') then if getCreatureCondition(cid, CONDITION_FIRE) == TRUE then npcHandler:say("You are burning. I will help you.", cid) doRemoveCondition(cid, CONDITION_FIRE) doSendMagicEffect(getCreaturePosition(cid), 14) elseif getCreatureCondition(cid, CONDITION_POISON) == TRUE then npcHandler:say("You are poisoned. I will help you.", cid) doRemoveCondition(cid, CONDITION_POISON) doSendMagicEffect(getCreaturePosition(cid), 13) elseif getCreatureHealth(cid) < 65 then npcHandler:say("You are looking really bad. Let me heal your wounds.", cid) doCreatureAddHealth(cid, 65 - getCreatureHealth(cid)) doSendMagicEffect(getCreaturePosition(cid), 12) else npcHandler:say("You aren't looking really bad, " .. getCreatureName(cid) .. ". I only help in cases of real emergencies. Raise your health simply by eating {food}.", cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_WALKAWAY, "Well, bye then.")
-
Acho que com ids que funcionam como recipientes de liquidos você faz o seguinte: doPlayerAddItem(uid, itemid, count/subtype) Na parte de count/subtype você poem esses numeros (não tenho certeza mas acho que não precisa do 2000): <item id="20001" name="water" /> <item id="20002" name="blood" /> <item id="20003" name="beer" /> <item id="20004" name="slime" /> <item id="20005" name="lemonade" /> <item id="20006" name="milk" /> <item id="20007" name="manafluid" /> <item id="20010" name="lifefluid" /> <item id="20011" name="oil" /> <item id="20013" name="urine" /> <item id="20014" name="coconut milk" /> <item id="20015" name="wine" /> <item id="20019" name="mud" /> <item id="20021" name="fruit juice" /> <item id="20026" name="lava" /> <item id="20027" name="rum" /> <item id="20028" name="swamp" /> <item id="20035" name="tea" /> <item id="20041" name="antidote potion" /> <item id="20042" name="health potion" /> <item id="20043" name="spirit potion" /> <item id="20047" name="mana potion" /> Exemplo: doPlayerAddItem(cid, 2012, 3) ---- mug com beer doPlayerAddItem(cid, 2012, 27) ---- mug com rum
-
Arrumei o script do amigo ai, ve se funciona agora: function onSay(cid, words, param) local x = 0 local y = "" if words == "!magic" then x = getPlayerMagLevel(cid) y = "Magic Level" elseif words == "!fist" then x = getPlayerSkill(cid, 0) y = "Fist Fighting" elseif words == "!club" then x = getPlayerSkill(cid, 1) y = "Club Fighting" elseif words == "!sword" then x = getPlayerSkill(cid, 2) y = "Sword Fighting" elseif words == "!axe" then x = getPlayerSkill(cid, 3) y = "Axe Fighting" elseif words == "!distance" then x = getPlayerSkill(cid, 4) y = "Distance Fighting" elseif words == "!shielding" then x = getPlayerSkill(cid, 5) y = "Shielding" elseif words == "!fishing" then x = getPlayerSkill(cid, 6) y = "Fishing" end doPlayerPopupFYI(cid, y .. ": " .. x) return true end
-
Eu fiz o seguinte, deletei as duas linhas que você disse e coloquei isso: local storagepremio = 50060 local premio = 2294 if getPlayerStorageValue(getCreatureMaster(killer), storagepremio) <= 0 then doPlayerAddItem(getCreatureMaster(killer), premio) setPlayerStorageValue(getCreatureMaster(killer), storagepremio, 1) else doPlayerSendTextMessage(getCreatureMaster(killer),MESSAGE_EVENT_ADVANCE,"Você já pegou o prêmio desse ginásio.") end No geral ficou assim: function onDeath(cid, corpse) doSendMagicEffect(getThingPos(cid), 10) local npc = ""..getPlayerStorageValue(cid, 201).."" local turn = getPlayerStorageValue(cid, 202) local nturn = ((turn) + 1) local nxt = ginasios[npc][turn].nextp doCreatureSay(getCreatureByName(npc), ginasios[npc][turn].msgba, 1) if nxt == "finish" then local killer = getItemAttribute(corpse.uid, "corpseowner") addEvent(doCreatureSay, 1200, getCreatureByName(npc), ginasios[npc].msgwin, 1) setPlayerStorageValue(getCreatureMaster(killer), ginasios[npc].storage, 2) local storagepremio = 50060 local premio = 2294 if getPlayerStorageValue(getCreatureMaster(killer), storagepremio) <= 0 then doPlayerAddItem(getCreatureMaster(killer), premio) setPlayerStorageValue(getCreatureMaster(killer), storagepremio, 1) else doPlayerSendTextMessage(getCreatureMaster(killer),MESSAGE_EVENT_ADVANCE,"Você já pegou o prêmio desse ginásio.") end doRemoveCreature(cid) return false end local function summonNext(poke, pos, gym, msg, cid) local x = doSummonCreature(poke, pos) addEvent(gymChecker, 1000, x, cid, 0) doSendMagicEffect(getThingPos(x), 10) doCreatureSay(getCreatureByName(gym), msg, 1) end local killer = getItemAttribute(corpse.uid, "corpseowner") addEvent(doGymBattle, 1200, npc, ginasios[npc][turn].nextp, killer, nturn) doRemoveCreature(cid) return false end local fightconditionnn = createConditionObject(CONDITION_INFIGHT) setConditionParam(fightconditionnn, CONDITION_PARAM_TICKS, 18 * 1000) function onAttack(cid, target) if getPlayerStorageValue(getCreatureMaster(target), ginasios[getPlayerStorageValue(cid, 201)].storage) ~= 1 then doMonsterChangeTarget(cid) doChangeSpeed(cid, -getCreatureSpeed(cid)) return true end if isPlayer(target) then if #getCreatureSummons(target) == 0 then doMonsterChangeTarget(cid) doChangeSpeed(cid, -getCreatureSpeed(cid)) return true end if #getCreatureSummons(target) >= 1 then doMonsterSetTarget(cid, getCreatureSummons(target)[1]) end end if getCreatureSpeed(cid) == 0 then doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, 200) end doAddCondition(getCreatureMaster(target), fightconditionnn) return true end function onCast(cid, target) if isPlayer(target) then return false end local targete = getCreatureTarget(cid) if isPlayer(getCreatureMaster(targete)) and getPlayerStorageValue(getCreatureMaster(targete), ginasios[getPlayerStorageValue(cid, 201)].storage) ~= 1 then return false end return true end function onDirection(cid, old, current) if isCreature(getCreatureTarget(cid)) and not isPlayer(getCreatureTarget(cid)) and getPlayerStorageValue(getCreatureMaster(getCreatureTarget(cid)), ginasios[getPlayerStorageValue(cid, 201)].storage) == 1 then return true end return false end Espero ter ajudado.
-
Seguinte, pelo que eu vi aqui, se o cara estiver com menos de 65 de HP o npc simplesmente irá curalo e não vai abrir chat algum... Se o cara estiver com + de 65 de HP o npc responde: "Hello, "..getCreatureName(cid).."! I'll {heal} you if you are badly injured or poisoned. Feel free to ask me for {help} or general {hints}." ???????????? Se for isso, só substituir o arquivo por esse aqui que o npc vai abrir o chat não importa a vida do cara. 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 creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if (msgcontains(msg, "hello") or msgcontains(msg, "hi")) and not npcHandler:isFocused(cid) then if getCreatureHealth(cid) < 65 then npcHandler:say("Hello, "..getCreatureName(cid).."! You are looking really bad. Let me heal your wounds.", cid) doCreatureAddHealth(cid, 65 - getCreatureHealth(cid)) doSendMagicEffect(getCreaturePosition(cid), 12) npcHandler:addFocus(cid) else selfSay("Hello, "..getCreatureName(cid).."! I'll {heal} you if you are badly injured or poisoned. Feel free to ask me for {help} or general {hints}.", cid, TRUE) npcHandler:addFocus(cid) end return true end if(not npcHandler:isFocused(cid)) then return false elseif msgcontains(msg, "bye") or msgcontains(msg, "farewell") then selfSay("Farewell, " .. getCreatureName(cid) .. "!", cid, TRUE) npcHandler:releaseFocus(cid) elseif msgcontains(msg, "heal") then if getCreatureCondition(cid, CONDITION_FIRE) == TRUE then npcHandler:say("You are burning. I will help you.", cid) doRemoveCondition(cid, CONDITION_FIRE) doSendMagicEffect(getCreaturePosition(cid), 14) elseif getCreatureCondition(cid, CONDITION_POISON) == TRUE then npcHandler:say("You are poisoned. I will help you.", cid) doRemoveCondition(cid, CONDITION_POISON) doSendMagicEffect(getCreaturePosition(cid), 13) elseif getCreatureHealth(cid) < 65 then npcHandler:say("You are looking really bad. Let me heal your wounds.", cid) doCreatureAddHealth(cid, 65 - getCreatureHealth(cid)) doSendMagicEffect(getCreaturePosition(cid), 12) else npcHandler:say("You aren't looking really bad, " .. getCreatureName(cid) .. ". I only help in cases of real emergencies. Raise your health simply by eating {food}.", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_WALKAWAY, "Well, bye then.") Se não funcionar, posta denovo que dai eu testo no meu servidor antes de postar aqui...
-
Acho que arrumei o problema... qualquer coisa posta denovo que eu dou uma olhada. actions.xml
-
Fiz um bem simples, espero que seja isso mesmo: local dinheiro = 2145 -- id dos small diamonds local quantidade = 5 -- quantos small diamonds? local compra = 2445 -- id do crystal mace function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerItemCount(cid, dinheiro) >= quantidade then doPlayerAddItem(cid, compra, 1) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Você comprou um '..getItemNameById(compra)..' por '..quantidade..' '..getItemNameById(dinheiro)..'.') else doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Você precisa de '..quantidade..' '..getItemNameById(dinheiro)..' para comprar esse item.') end return true end Dai é só escolher um actiondID, colocar na alavanca e registrar no actions.xml Exemplo: <action actionid="50060" script="alavanca.lua"/>
-
Então, resumidamente: Source é o conjunto de "arquivos" que você junta (C++) para formar o arquivo .exe do seu servidor (sim, existe uma porrada de informação imbutida naquele arquivo .exe que você usa para abrir o seu servidor e se não me engano, a unica forma de saber quais são essas informações é tendo esses arquivos de C++ que foram usados para criar o seu Executável). Lembrando que não é bom deixar qualquer um fazer alterações nas sources do seu servidor justamente por causa do que falei ai em cima... O cara pode ter feito alguma gambiarra para fo**r com o seu servidor e você raramente vai descubrir isso. Espero não ter explicado muito porcamente.
-
Eu aproveitei e dei uma organizada no npc... espero ter ajudado. 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, 'list')) then selfSay('Eu vendo {Master Vip Medal}, {Master Crown},{Master Cloak},{Master Kilt}, {Master Shoes}, {Master God Shield}, {Master Helmet}, {Master Mail}, {Master Legs}, {Master Boots}, {Master Shield}, {Master Addon Doll}, {Master Blade}, {Master Imaginary Staff}, {Master Wand}, {Master Xp Ring}, {Master Arrow}, {Master Bow}, {Master Axe}.Por Moedas Master', cid) elseif(msgcontains(msg, 'Master Blade')) then selfSay('Voc\ê quer comprar Master Blade por 2 Master Coin?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'Master Imaginary Staff')) then selfSay('Voc\ê quer comprar Master Staff por 1 Master Coin?', cid) talkState[talkUser] = 2 elseif(msgcontains(msg, 'Master Axe') )then selfSay('Voc\ê quer comprar Master Axe por 5 Master Coin?', cid) talkState[talkUser] = 3 elseif(msgcontains(msg, 'Master Wand') )then selfSay('Voc\ê quer comprar Master Wand por 5 Master Coin?', cid) talkState[talkUser] = 4 elseif(msgcontains(msg, 'Master Bow') )then selfSay('Voc\ê quer comprar Master Bow por 5 Master Coin?', cid) talkState[talkUser] = 5 elseif(msgcontains(msg, 'Master Arrow') )then selfSay('Voc\ê quer comprar Master Arrow por 2 Master Coin?', cid) talkState[talkUser] = 6 elseif(msgcontains(msg, 'Master Xp Ring') )then selfSay('Voc\ê quer comprar Master Xp Ring por 3 Master Coin?', cid) talkState[talkUser] = 7 elseif(msgcontains(msg, 'Master Vip Medal') )then selfSay('Voc\ê quer comprar Master Vip Medal por 5 Master Coin?', cid) talkState[talkUser] = 8 elseif(msgcontains(msg, 'Master Addon Doll') )then selfSay('Voc\ê quer comprar Master Vip Medal por 1 Master Coin?', cid) talkState[talkUser] = 9 elseif(msgcontains(msg, 'Master Crown') )then selfSay('Voc\ê quer comprar Master Crown por 2 Master Coin?', cid) talkState[talkUser] = 10 elseif(msgcontains(msg, 'Master Cloak') )then selfSay('Voc\ê quer comprar Master Cloak por 2 Master Coin?', cid) talkState[talkUser] = 11 elseif(msgcontains(msg, 'Master Kilt') )then selfSay('Voc\ê quer comprar Master Kilt por 2 Master Coin?', cid) talkState[talkUser] = 12 elseif(msgcontains(msg, 'Master Shoes') )then selfSay('Voc\ê quer comprar Master Shoes por 2 Master Coin?', cid) talkState[talkUser] = 13 elseif(msgcontains(msg, 'Master God Shield') )then selfSay('Voc\ê quer comprar Master God Shield por 2 Master Coin?', cid) talkState[talkUser] = 14 elseif(msgcontains(msg, 'Master Helmet') )then selfSay('Voc\ê quer comprar Master Helmet por 2 Master Coin?', cid) talkState[talkUser] = 15 elseif(msgcontains(msg, 'Master Mail') )then selfSay('Voc\ê quer comprar Master Mail por 2 Master Coin?', cid) talkState[talkUser] = 16 elseif(msgcontains(msg, 'Master Legs') )then selfSay('Voc\ê quer comprar Master Legs por 2 Master Coin?', cid) talkState[talkUser] = 17 elseif(msgcontains(msg, 'Master Boots') )then selfSay('Voc\ê quer comprar Master Boots por 2 Master Coin?', cid) talkState[talkUser] = 18 elseif(msgcontains(msg, 'Master Shield') )then selfSay('Voc\ê quer comprar Master Shield por 2 Master Coin?', cid) talkState[talkUser] = 19 -- Confirmação da Compra elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12610, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if(doPlayerRemoveItem(cid, 2157, 1) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7409, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 1 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 3) then if(doPlayerRemoveItem(cid, 2157, 5) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8925, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 5 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 4) then if(doPlayerRemoveItem(cid, 2157, 5) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7424, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 5 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 5) then if(doPlayerRemoveItem(cid, 2157, 5) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8855, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 5 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 6) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7840, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 7) then if(doPlayerRemoveItem(cid, 2157, 3) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7697, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 3 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 8) then if(doPlayerRemoveItem(cid, 2157, 5) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 5785, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 5 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 9) then if(doPlayerRemoveItem(cid, 2157, 1) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 11390, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 1 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 10) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12591, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 11) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 8870, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 12) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 7896, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 13) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 6132, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 14) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12608, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 15) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12606, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 16) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12603, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 17) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 12604, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 18) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 2646, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 19) then if(doPlayerRemoveItem(cid, 2157, 2) == true) then selfSay('Obrigado por comprar!', cid) doPlayerAddItem(cid, 2523, 1) talkState[talkUser] = 0 else selfSay('Voc\ê n\ão tem 2 Master Coin', cid) talkState[talkUser] = 0 end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Qualquer coisa tamo ae =D
-
O problema é nessa parte aqui: <item id="11371" article="a" name="dead lancer beetle"> <attribute key="containerSize" value="10" /> <attribute key="decayTo" value="11372" <attribute key="duration" value="300" /> <attribute key="corpseType" value="blood" /> <attribute key="fluidSource" value="blood" /> </item> É oque eu falei ali em cima, toda "tag" de atributo precisa ter um começo e um fim. Nessa parte aqui: <attribute key="decayTo" value="11372" <attribute key="duration" value="300" /> Aquele primeiro atributo não tem fim: <attribute key="decayTo" value="11372" Tudo que você precisa fazer é terminar a tag colocando o />, exemplo: <attribute key="decayTo" value="11372" /> <attribute key="duration" value="300" /> items.xml
-
Toda linha de atributo que você colocar tem que ter um fim, no caso faltou simplesmente isso aqui: /> items.xml
-
manda o arquivo denovo Edit: melhor, quando der erro assim ja posto com o arquivo.
-
Falha minha, perdoe minha incompetencia =X items.xml
-
Você acabou deletando a linha que eu falei para não deletar, mas ta beleza, eu arrumei aqui pra você =D items.xml
-
Se não for muito incomodo, você poderia postar o items.xml depois da sua alteração?
-
O problema ta nessa parte aqui: <item id="20014" name="coconut milk" /> <item id="20015" name="wine" /> <item id="20019" name="mud" /> <item id="20021" name="fruit juice" /> <item id="20026" name="lava" /> <item id="20027" name="rum" /> <item id="20028" name="swamp" /> <item id="20035" name="tea" /> </item> Só remover esse </item> da ultima linha que eu postei ai. Eu dei uma olhada no geral do seu itens.xml e vi que varios itens estão duplicados. Parece que vc abriu o itens.xml antigo e simplesmente colocou mais coisa no final (algumas repitidas). Existem duas partes iguais no seu script então cuidado, a parte que eu falei pra deletar é a primeira, tem uma igual exatamente no final do seu itens.xml, não deleta de la não. Eu acho que mesmo assim, se você remover aquela linha que falei ali você vai conseguir abrir o ot (ele vai dar alguns erros falando sobre esses itens duplicados mas vai abrir).
-
Então amigo, normalmente isso acontece pq o jogador esta sendo criado com uma Flag que permite ele usar todos os addons, eu não sei qual versão/distro você esta usando mas no meu isso ai fica na pasta /data/XML/groups.xml La vai ter algo mais ou menos assim: <?xml version="1.0" encoding="UTF-8"?> <groups> <group id="1" name="Player"/> <group id="2" name="Tutor" flags="16809984" customFlags="2" access="1"/> <group id="3" name="Senior Tutor" flags="68736352256" customFlags="14" access="2" maxVips="200"/> <group id="4" name="Gamemaster" flags="3808558964575" customFlags="257215" access="3" depotLimit="3000" maxVips="300" outfit="302"/> <group id="5" name="Senior Gamemaster" flags="3840774348794" customFlags="781823" access="4" depotLimit="4000" maxVips="400" outfit="266"/> <group id="6" name="Administrador" flags="57172457136122" customFlags="62910463" access="5" depotLimit="5000" maxVips="500" outfit="75"/> </groups> Esses numeros nas flags representam as vantagens que esse jogador vai ter... Não ganhar pz, poder usar todas as magias e TER TODOS OS ADDONS. Espero ter ajudado, qualquer coisa add reputação =D
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.