Postado Abril 11, 2017 8 anos Spoiler <?xml version="1.0" encoding="UTF-8"?> <creaturescripts> <event type="login" name="BattleLogin" event="script" value="BattleCreatureScript.lua"/> <event type="PrepareDeath" name="BattleDeath" event="script" value="BattleCreatureScript.lua"/> <event type="combat" name="BattleTeam" event="script" value="BattleCreatureScript.lua"/> <event type="statschange" name="zombieevent" event="script" value="zombie.lua"/> <event type="login" name="PlayerLogin" event="script" value="login.lua"/> <event type="statschange" name="CombatDodge" event="script" value="dodgecombat.lua"/> <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/> <event type="receivemail" name="Mail" event="script" value="mail.lua"/> <event type="login" name="CheckMcManager" event="script" value="checkmcmanager.lua"/> <event type="login" name="Antimc" event="script" value="antimc.lua"/> <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/> <event type="login" name="Antiacc" event="script" value="antiacc.lua"/> <event type="death" name="teledonate" script="teledonate.lua"/> <event type="death" name="telelord" script="telelord.lua"/> <event type="death" name="teleking" script="teleking.lua"/> <event type="death" name="teleportmonster" script="tpmonster.lua"/> <event type="death" name="tpdruid" event="script" value="tpdruid.lua"/> <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/> <event type="death" name="DeathTeam1" event="script" value="WarArenaDeathTeam1.lua"/> <event type="death" name="DeathTeam2" event="script" value="WarArenaDeathTeam2.lua"/> <event type="kill" name="kills" event="script" value="kills.lua"/> <event type="login" name="AntiMB" event="script" value="antimb.lua"/> <event type="login" name="ExpVip" script="vipexp.lua"/> <event type="death" name="DeathC" event="script" value="deathbroadcast.lua"/> <event type="look" name="fraglook" event="script" value="fraglook.lua"/> <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> <event type="death" name="tp" event="script" value="tp.lua"/> <event type="login" name="Conected" script="customlogin.lua"/> <event type="Advance" name="AdvEffect" script="advance.lua"/> <!-- CTF --> <event type="logout" name="CTFLogout" event="script" value="CTFMax.lua"/> <event type="combat" name="CTFCombat" event="script" value="CTFMax.lua"/> <event type="attack" name="CTFAttack" event="script" value="CTFMax.lua"/> <event type="statschange" name="CTFDeath" event="script" value="CTFMax.lua"/> <!-- Blood Castle --> <event type="death" name="guardablood" event="script" value="BloodCreatureGuarda.lua"/> <event type="death" name="arcanjoblood" event="script" value="BloodCreatureAnjo.lua"/> <event type="death" name="morrerblood" event="script" value="BloodCreaturePlayer.lua"/> <event type="death" name="loginblood" event="script" value="BloodCreaturePlayer.lua"/> <!-- Potion Double Exp --> <event type="login" name="expRate" event="script" value="potionexp.lua"/> <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/> <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/> <event type="login" name="FirstItems" event="script" value="firstitems.lua"/> <event type="PrepareDeath" name="pvparena" script="pvparena.lua"/> <event type="attack" name="attackguild" script="attackguild.lua"/> <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/> </creaturescripts> Olá caro membros da TK, venho por meio deste pedir uma ajuda em relação ao problema citado no título. Bem, explicando o problema... Do nada aparece um mensagem no distro falando de um erro no CREATURESCRIPT BUFFONKILL.... Segue a imagem. Gostaria de uma ajuda o mais breve possível, dando REP+ para aqueles que der atenção.. Att: Wilker Editado Abril 11, 2017 8 anos por wilkerankaro Add script creatures (veja o histórico de edições)
Postado Abril 11, 2017 8 anos posta o script né Scriptszinhos: Spoiler [CREATURESCRIPT] Auto TP depois de matar boss [ACTION] Clean Area [TALKACTION] !FelizAnoNovo [ACTION + MOVEMENT] Cartas ao GOD [CREATURESCRIPT] Always Emblem System [ACTION] Anihi simples [TALKACTIONS] Urinar / fazer xixi Não abandone seu tópico, quando você tiver a dúvida resolvida sozinho tente ensinar aos outros como resolve-la (você pode não ser o único com o problema) e quando ela for resolvida por outra pessoa não se esqueça de marcar como melhor resposta e deixar o gostei.
Postado Abril 12, 2017 8 anos na verdade é algum MODS que está com esse erro. [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Abril 12, 2017 8 anos Autor Ok, vou colocar todos os arquivos do MODS aqui. Spoiler <?xml version="1.0" encoding="utf-8"?> <monster name="bad bug" namedescription="a bad bug" race="venom" experience="18" speed="240" manacost="250"> <health now="29" max="29"/> <look type="45" head="20" body="30" legs="40" feet="50" corpse="5990"/> <targetchange interval="2000" chance="0"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="1"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> <flag skull="red"/> </flags> <attacks> <attack name="melee" interval="2000" skill="23" attack="9"/> </attacks> <defenses armor="2" defense="3"/> <elements> <element firePercent="-10"/> </elements> <loot> <item id="3976" countmax="10" chance="50000"/> <item id="2148" countmax="4" chance="100000"/> <item id="2679" countmax="3" chance="50000"/> </loot> </monster> Spoiler <?xml version="1.0" encoding="UTF-8"?> <monster name="bad rabbit" nameDescription="a bad rabbit" race="blood" experience="0" speed="180" manacost="220"> <health now="15" max="15"/> <look type="74" head="20" body="30" legs="40" feet="50" corpse="6017"/> <targetchange interval="5000" chance="20"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="0"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="1"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="15"/> <flag skull="white"/> </flags> <attacks> <attack name="melee" interval="2000" skill="0" attack="0"/> </attacks> <defenses armor="1" defense="2"/> <immunities> <immunity physical="0"/> <immunity energy="0"/> <immunity fire="0"/> <immunity poison="0"/> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="0"/> <immunity invisible="0"/> </immunities> <loot> <item id="2684" countmax="4" chance="70000"/> <item id="2666" countmax="2" chance="20000"/> </loot> </monster> Spoiler <?xml version="1.0" encoding="UTF-8"?> <monster name="hero hacker" nameDescription="a hero hacker" race="blood" experience="45" speed="250" manacost="0"> <health now="430" max="430"/> <look type="8" head="20" body="30" legs="40" feet="50" corpse="5980"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="429"/> <flag skull="yellow"/> </flags> <attacks> <attack name="melee" interval="1000" skill="20" attack="55"/> </attacks> <defenses armor="15" defense="12"> <defense name="speed" interval="1000" chance="15" speedchange="290" duration="6000"> <attribute key="areaEffect" value="redshimmer"/> </defense> <defense name="outfit" interval="10000" chance="15" monster="pig" duration="500"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <immunities> <immunity physical="0"/> <immunity energy="1"/> <immunity fire="1"/> <immunity poison="1"/> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="1"/> <immunity invisible="0"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="Feel the wrath of me dos attack!"/> <voice sentence="You're next!"/> <voice sentence="Gimme free gold!"/> <voice sentence="Me sooo smart!"/> <voice sentence="Me have a cheating link for you!"/> <voice sentence="Me is GM!"/> <voice sentence="Gimme your password!"/> <voice sentence="Me just need the code!"/> <voice sentence="Me not stink!"/> <voice sentence="Me other char is highlevel!"/> </voices> <loot> <item id="2148" countmax="12" chance="100000"/> --Gold Coin <item id="2671" chance="50000"/> --Ham <item id="6570" chance="5538"/> --Blue Surprise Bag <item id="6571" chance="1538"/> --Red Surprise Bag <item id="2044" chance="6666"/> --Lamp <item id="1987" chance="100000"> <inside> <item id="2381" chance="10000"/> <item id="2386" chance="10000"/> <item id="2391" chance="5000"/> <item id="2378" chance="5000"/> </inside> </item> </loot> </monster> Spoiler <?xml version = "1.0" encoding = "utf-8" ?> <mod name = "Private Shop[MaXwEllDeN]" author = "MaXwEllDeN" contact = "[email protected]" version = "1.0" enabled = "yes"> <event type = "login" name = "PvShop" event = "script" value = "Private Shop/Creaturescripts.lua"/> <event type = "logout" name = "PvShopLOGOUT" event = "script" value = "Private Shop/Creaturescripts.lua"/> <event type = "preparedeath" name = "PvShopDEATH" event = "script" value = "Private Shop/Creaturescripts.lua"/> <talkaction words = "!pvshop" event = "script" value = "Private Shop/Talkaction.lua"/> </mod> Spoiler <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Loot System" version="1.0" author="NexTH, Vodkart and Mkalo" contact="[email protected]" enabled="yes"> <config name="Loot_func"><![CDATA[ info = { AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {2123,2515}, Max_Slots = {free = 2, premium = 5}, Storages = {27000,28001,28002} } function setPlayerStorageTable(cid, storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1)) end function getPlayerStorageTable(cid, storage) local tabstr = getPlayerStorageValue(cid, storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function isInTable(cid, item) for _,i in pairs(getPlayerStorageTable(cid, info.Storages[1]))do if tonumber(i) == tonumber(item) then return true end end return false end function addItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do table.insert(x,getPlayerStorageTable(cid, info.Storages[1])) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, info.Storages[1], x) else setPlayerStorageTable(cid, info.Storages[1], {item}) endendfunction removeItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do table.insert(x,getPlayerStorageTable(cid, info.Storages[1])) end for i,v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x,i) end end return setPlayerStorageTable(cid, info.Storages[1], x)endfunction ShowItemsTabble(cid) local n,str = 0,"[+] PHOENIX AUTOLOOT [+]\n\n!autoloot +nome do item --> para adicionar itens.\n!autoloot money --> vai coletar todo dinheiro.\n!autoloot clear --> limpar os slots.\n!autoloot on/off --> ativa ou desativa o sistema.\n\n[+] Informacoes Sobre VOCE [+]\n\nSeu autoloot esta "..(getPlayerStorageValue(cid, info.Storages[3]) <= 0 and "desativado" or "ativado")..".\nColeta de dinheiro esta "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "ativado" or "desativado")..".\nExtrato atual da conta bancaria: ["..getPlayerBalance(cid).."] gp's.\nMaximum Slots: ["..#getPlayerStorageTable(cid, info.Storages[1]).."/"..(isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free).."] \n\n" for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do n = n + 1 str = str.."Slot "..n.." - "..getItemNameById(getPlayerStorageTable(cid, info.Storages[1])).."\n\n[+] Sistema criado\editado por NexTH, Mkalo e Vodkart. [+]\n" end return doPlayerPopupFYI(cid, str)endfunction getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return itemsendfunction 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) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return itemsendfunction doPlayerAddItemStacking(cid, itemid, amount) -- revisado local item, _G = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid), 0 if #item > 0 then for _ ,x in pairs(item) do local ret = getThing(x) if ret.type < 100 then doTransformItem(ret.uid, itemid, ret.type+amount) if ret.type+amount > 100 then doPlayerAddItem(cid, itemid, ret.type+amount-100) end break else _G = _G+1 end end if _G == #item then doPlayerAddItem(cid, itemid, amount) end else return doPlayerAddItem(cid, itemid, amount) endendfunction AutomaticDeposit(cid,item,n) local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1) return doPlayerDepositMoney(cid, deposit)endfunction ExistItemByName(name) -- by vodka local items = io.open("data/items/items.xml", "r"):read("*all") local get = items:match('name="' .. name ..'"') if get == nil or get == "" then return false end return trueendfunction corpseRetireItems(cid, pos) local check = false for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local items = getContainerItems(tile.uid) for i,x in pairs(items) do if isInArray(getPlayerStorageTable(cid, info.Storages[1]), tonumber(x.itemid)) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray({2148,2152,2160},tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit == true and isInArray({2148,2152,2160}, tonumber(x.itemid)) then AutomaticDeposit(cid,x.itemid,x.type) end else doPlayerAddItem(cid, x.itemid) end doRemoveItem(x.uid) end end endend]]></config><event type="login" name="LootLogin" event="script"><![CDATA[function onLogin(cid) registerCreatureEvent(cid, "LootEventKIll") if isPremium(cid) and getPlayerStorageValue(cid, 27001) <= 0 then setPlayerStorageValue(cid, 27001, 1) elseif getPlayerStorageValue(cid, 27001) > 0 and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Auto Loot] Diga !autoloot, para se informar") setPlayerStorageValue(cid, 27001, -1) setPlayerStorageValue(cid, info.Storages[1], -1) end return trueend]]></event><event type="kill" name="LootEventKIll" event="script"><![CDATA[domodlib('Loot_func')function onKill(cid, target, lastHit) if isPlayer(cid) and getPlayerStorageValue(cid, info.Storages[3]) <= 0 and isMonster(target) and not isInArray(info.BlockMonsters, getCreatureName(target):lower()) then addEvent(corpseRetireItems, 0, cid ,getThingPos(target)) end return trueend]]></event><talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[domodlib('Loot_func')local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.freeif not param or param == "" then ShowItemsTabble(cid) return trueelseif tonumber(param) then doPlayerSendCancel(cid, "diga: !autoloot") return trueelseif isInArray({"clean","limpar", "clear"}, param) then setPlayerStorageValue(cid, info.Storages[1], -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Todos os SLOTs foram limpos.") return trueelseif isInArray({"start","stop","on","off"}, param) then setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "iniciado" or "em pausa")..".") return trueelseif isInArray({"money","gold","gps","dinheiro"}, param) then setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Coleta de dinheiro "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "ativado" or "desativado")..".") return trueendlocal item = ExistItemByName(tostring(param))if not item then doPlayerSendCancel(cid, "Este item nao existe.") return trueendlocal item = getItemIdByName(tostring(param))if not item then doPlayerSendCancel(cid, "Este item nao existe.") return trueelseif isInArray({2148,2152,2160},item) then doPlayerSendCancel(cid, "Diga !autoloot money para coletar dinheiro!") return true elseif isInArray(info.BlockItemsList, item) then doPlayerSendCancel(cid, "Voce nao pode adicionar este item!") return trueelseif #getPlayerStorageTable(cid, info.Storages[1]) >= slots then doPlayerSendCancel(cid, "max "..slots.." slots para usufluir") return trueendlocal var = isInTable(cid, item)if not var then addItemTable(cid, item)else removeItemTable(cid, item)enddoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "voce adicionou "..param.." em sua lista." or "voce removeu "..param.." de sua lista")return true]]></talkaction></mod> Spoiler <?xml version="1.0" encoding="UTF-8"?><mod name="Highscore book" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes"> <action itemid="1981" event="buffer"><![CDATA[ if(item.actionid >= 150 and item.actionid <= 158) then doShowTextDialog(cid, item.itemid, getHighscoreString((item.actionid - 150))) else _result = false end ]]></action> <item id="1981" article="a" name="highscore book" override="yes"/></mod> Spoiler <?xml version="1.0" encoding="UTF-8"?><mod name="Custom Monsters" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes"> <!-- Skull Examples --> <monster name="Bad Bug" file="Custom/bad bug.xml"/> <monster name="Bad Rabbit" file="Custom/bad rabbit.xml"/> <monster name="Hero Hacker" file="Custom/hero hacker.xml"/></mod> Spoiler -- ########################################################-- ##### Name: Private Shop System #####-- ##### Version: 2.0 #####-- ########################################################-- ##### Developed by Maxwell Alcantara[MaXwEllDeN] #####-- ##### Contact: [email protected] #####-- ##### [email protected] #####-- ######################################################## function onLogin(cid) if (getPlayerStorageValue(cid, 75431) > 0) then local playerguid = getPlayerGUIDByName(getCreatureName(cid)) local ddec = 0 for a, b in pairs(getPlayerShopLucro(playerguid)) do doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You sold ".. b[1] .. "x ".. getItemNameById(a) .. getPrefix(b[1]) ..".") if (getPlayerStorageValue(cid, 21147) < 0) then setPlayerStorageValue(cid, 21147, 0) end setPlayerStorageValue(cid, 21147, getPlayerStorageValue(cid, 21147) + b[2]) end if (getPlayerStorageValue(cid, 21147) > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Total Gain: ".. getPlayerStorageValue(cid, 21147) .. " gold coin" .. getPrefix(getPlayerStorageValue(cid, 21147)) .. ".") doPlayerAddMoney(cid, getPlayerStorageValue(cid, 21147)) setPlayerStorageValue(cid, 21147, -1) end deleteNPCFile(getCreatureName(cid)) setPlayerShopLucro(playerguid, "{}") setPlayerStorageValue(cid, 75431, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Private Shop disabled.") end registerCreatureEvent(cid, "PvShopLOGOUT") registerCreatureEvent(cid, "PvShopDEATH") return trueend function onLogout(cid) if (getPlayerStorageValue(cid, 75431) > 0) then addEvent(createNPCShop, 1, getCreatureName(cid), getCreatureOutfit(cid), getPlayerGUIDByName(getCreatureName(cid)), getThingPos(cid), getCreatureLookDir(cid)) end return trueend local function aol(cid) if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid) and (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2173) then return true end return falseend function onPrepareDeath(cid, deathList) if (not getPlayerBlessing(cid, 33)) and (not aol(cid)) then setPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid)), "{}") end return trueend Spoiler -- ########################################################-- ##### Name: Private Shop System #####-- ##### Version: 2.0 #####-- ########################################################-- ##### Developed by Maxwell Alcantara[MaXwEllDeN] #####-- ##### Contact: [email protected] #####-- ##### [email protected] #####-- ######################################################## local function tabletama(tb) local tam = 0 for i, v in pairs(tb) do tam = tam + 1 end return tamend local funcs = {"on", "off", "add", "remove", "list", "help", "list"} function onSay(cid, words, param) local param = param:lower() local params = string.explode(param, ",") local param = params[1] local configs = _PV_SHOP_CONFIG if (configs.premmy) and not(isPremium(cid)) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must have a premium account to use this system.") end if (getPlayerLevel(cid) < configs.level) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must be at least level " .. configs.level .. " to use this system.") end if not(isInArray(funcs, param)) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You typed a invalid option, to see help window type ".. words .. " help.") end if (param == "on") then if (getCreatureCondition(cid, CONDITION_INFIGHT)) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't activate the system with your pz locked.") end local pos = getThingPos(cid) local pos1 = {x = pos.x-5, y = pos.y-5, z = pos.z} local pos2 = {x = pos.x+5, y = pos.y+5, z = pos.z} local uids = getUidsInArea(pos1, pos2) for _, b in pairs(uids) do if (not(isPlayer(b)) and not (isMonster(b))) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You're near a npc.") end end local pikznelis = 0 for _, a in pairs(getPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid)))) do pikznelis = 1 break end if (pikznelis == 0) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You must add a item to your shop before ative it.") end setPlayerStorageValue(cid, 75431, 1) addEvent(doRemoveCreature, 1, cid) elseif (param == "add") then if not(params[4]) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You typed a invalid option, to see help window type ".. words .. " help.") end local item if type(errors) == "function" then errors(false) item = getItemIdByName(params[2]) errors(true) else item = getItemIdByName(params[2], false) end if not (item) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, params[2] .." isn't a valid item.") end if (tabletama(getPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid)))) >= configs.maxitens) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't have more than ".. configs.maxitens.." types of items in your Private Shop.") end if (isInArray(configs.notadd, item)) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't add " .. params[2] .. " to Private Shop.") end if not(tonumber(params[3])) or (tonumber(params[3]) < 1) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, params[3] .. " isn't a valid quanty.") end if (getPlayerItemCount(cid, item) < tonumber(params[3])) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You haven't ".. params[3] .." " .. params[2] .."(s).") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You added with successful ".. params[3] .. " ".. params[2] .."(s) to your Private Shop.") doAddItemForPlayerShop(getPlayerGUIDByName(getCreatureName(cid)), item, params[3], params[4]) doPlayerRemoveItem(cid, item, tonumber(params[3])) elseif (param == "list") then local itens = getPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid))) local msgiteins = "Items in your Private Shop:\n" for a, b in pairs(itens) do msgiteins = msgiteins .. "\n".. b[1] .. " " .. getItemNameById(a) .. getPrefix(b[1]) .. " - ".. b[2] .. " Gold Coins" end local msgiteins = msgiteins .. "\nX-X-X-X-X-X-X-X-X-X-X-X-X" doShowTextDialog(cid, 2160, msgiteins) elseif (param == "remove") then if not(params[3]) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You typed a invalid option, to see help window type ".. words .. " help.") end if not(tonumber(params[3])) or (tonumber(params[3]) < 1) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, params[3] .. " isn't a valid quanty.") end local item = getItemIdByName(params[2]) if not (item) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, params[2] .." isn't a item.") end local shopt = getPlayerShopItens(getPlayerGUIDByName(getCreatureName(cid))) if not(shopt[item]) or (tonumber(shopt[item][1]) < tonumber(params[3])) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You haven't ".. params[3] .." " .. params[2] .."(s) in Private Shop.") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You removed with successful ".. params[3] .. " ".. params[2] .."(s) from your Private Shop.") doRemoveItemFromPlayerShop(getPlayerGUIDByName(getCreatureName(cid)), item, params[3]) doPlayerAddItem(cid, item, tonumber(params[3])) elseif (param == "help") then local msg = "Private Shop System Help: \n \n * add - is used to add a item to your Private Shop. \n" local msg = msg .." Usage Example: " .. words .. " add, item, quanty, price by unit" local msg = msg .."\n" .. words .. " add, demon armor, 1, 60000\n" local msg = msg .."\n * remove - is used to remove a item from your Private Shop. \n" local msg = msg .." Usage Example: " .. words .. " remove, item, quanty" local msg = msg .."\n" .. words .. " remove, demon armor, 5\n" local msg = msg .."\n * on - is used to active your Private Shop\n" local msg = msg .. "\n * list - displays in screen a window containing all items that you have in your Private Shop." doShowTextDialog(cid, 2160, msg) end return trueend Spoiler <?xml version="1.0" encoding="UTF-8"?><monster name="Training Monk" nameDescription="a training monk" race="blood" experience="0" speed="210" manacost="0"> <health now="99000" max="99000"/> <look type="57" corpse="3128"/> <targetchange interval="60000" chance="0"/> <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="1"/> <flag staticattack="50"/> <flag lightlevel="0"/> <flag lightcolor="0"/> <flag targetdistance="1"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="5000" min="0" max="-1"/> </attacks> <defenses armor="0" defense="0"> <defense name="healing" interval="10000" chance="100" min="24000" max="24000"/> </defenses> <immunities> <immunity physical="0"/> <immunity energy="0"/> <immunity fire="0"/> <immunity poison="0"/> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="0"/> <immunity invisible="1"/> </immunities> <loot> <item id="2148" countmax="20" chance="100000"/><!-- gold coin --> <item id="1949" chance="10000"/><!-- scroll --> <item id="2467" chance="10000"/><!-- leather armor --> <item id="2642" chance="6666"/><!-- sandals --> <item id="1987" chance="100000"><!-- bag --> <inside> <item id="2044" chance="6666"/><!-- lamp --> <item id="2689" countmax="3" chance="20000"/><!-- bread --> <item id="2401" chance="3333"/><!-- staff --> <item id="2166" chance="1428"/><!-- power ring --> </inside> </item> </loot></monster> Editado Abril 12, 2017 8 anos por wilkerankaro (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.