Postado Novembro 23, 2022 2 anos .Qual servidor ou website você utiliza como base? Qual o motivo deste tópico? Está surgindo algum erro? Se sim coloque-o aqui. Citar o sistema é o seguinte, quando o evento abrir, diversos players entraram em uma "arena" onde nascera um boss, e tipo o player que der o maior hit ganha o evento com a premiação de ter um lugar exclusivo para ele upar. Você tem o código disponível? Se tiver publique-o aqui: Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Novembro 29, 2022 2 anos cara eu acho que tenho um sistema parecido perdido aqui, o role e que e quem matar ele q ira ganhar e não quer der o maior hit. tu pode tentar adaptar alguns sistema que drop algum item e esse item vai da uma storange **** que com ela tu consiga fazer um piso so quem tiver ela passa la dai tu faz a hunt. pode tentar adaptar esse aqui
Postado Novembro 29, 2022 2 anos Tag - creaturescripts.xml (data\creaturescripts? <event type="death" name="BOSSReward" event="script" value="bossreward.lua"/> Registre o creature event no XML do monster: <script> <event name="BOSSReward"/> </script> bossreward.lua (data\creaturescripts\scripts Spoiler local lasthit = {2160, 1} -- lasthitkiller = {itemid, amount} -- Item Para O LasHit Receber Ao Lado A Quantidade local mostdmg = {2160, 1} -- mostdamagekiller = {itemid, amount} -- Item Para O Mostdamager Receber Ao Lado A Quantidade function doPlayerAddDepotItems(pid, item, count) -- function by magus - modified by vodkart local item, count = {item}, {(count or 1)} for k, v in ipairs(item) do local ls = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..pid.." ORDER BY `sid` DESC LIMIT 1") return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..pid..", "..(ls:getDataInt("sid")+1)..", 101, "..v..", "..count[k]..", '')") or false end end function onDeath(cid, corpse, deathList) local last, most = deathList[1], deathList[2] if isPlayer(last) then if getPlayerFreeCap(last) > getItemWeightById(lasthit[1], lasthit[2]) then doPlayerAddItem(last, lasthit[1], lasthit[2]) doPlayerSendTextMessage(last, MESSAGE_INFO_DESCR, 'TEXTO DA RECOMPENSA DE ITEM APENAS PARA O LAST HIT COM CAP') else doPlayerAddDepotItems(last, lasthit[1], lasthit[2]) doPlayerSendTextMessage(last, MESSAGE_STATUS_CONSOLE_BLUE, 'TEXTO DA RECOMPENSA DE ITEM APENAS PARA O LAST HIT SEM CAP') end end if isPlayer(most) then if getPlayerFreeCap(most) > getItemWeightById(mostdmg[1], mostdmg[2]) then doPlayerAddItem(most, mostdmg[1], mostdmg[2]) setPlayerStorageValue(cid, 130132, os.time()+86400) -- Storage + Dia em Segundos ( 1 Dia = 86400 ) doPlayerSendTextMessage(most, MESSAGE_INFO_DESCR, 'TEXTO QUE RECEBERA AO DERROTAR BOSS E TIVER CAP PARA RECEBER RECOMPENSA + STORAGE DA CAVE EXCLUSIVA') else setPlayerStorageValue(cid, 130132, os.time()+86400) -- Storage + Dia em Segundos ( 1 Dia = 86400 ) doPlayerAddDepotItems(most, mostdmg[1], mostdmg[2]) doPlayerSendTextMessage(most, MESSAGE_STATUS_CONSOLE_BLUE, 'TEXTO QUE RECEBERA AO DERROTAR BOSS SE NÃO TIVER CAP PARA RECEBER RECOMPESA + STORAGE DA CAVE EXCLUSIVA.') end end return true end Tag - ilha.lua (data\talkactions? <talkaction words="!ilha" event="script" value="ilha.lua"/> Ilha.lua: Spoiler function onSay(cid, words, param) if getPlayerStorageValue(cid, 130132) < os.time() then doPlayerSendTextMessage(cid, 27, "Texto para quem ta tentando usar comando porem n foi oque deu mais dano") return true end if not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendTextMessage(cid, 27, "Para Usar O Comando Va Para O Protection Zone") return true end if getPlayerStorageValue(cid, 130132) > os.time() then -- STORAGE CONFIGURADO NO SCRIPT DE RECOMPENSA DO BOSS doTeleportThing(cid, {x= 2075, y= 58, z= 5}) -- LUGAR PARA ONDE SERÁ TELEPORTADO return true end return true end Editado Novembro 29, 2022 2 anos por Thony D. Serv (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.