Ir para conteúdo
  • 0

Sistema de Mineração


lukas13on

Pergunta

\-------------------------------------------------------------------------------/

\ Eu preciso de um sistema de mineração:

\ a cada 60 minutos o personagem tem direito a

\ usar uma picareta em cima do item :1354

\ que colete (1) Crystal coin: 2160

\------------------------------------------------------------------------------/

\ apenas usuarios de level 100+ poderão usar o item,

\ as rochas:1354 , depois de usadas, tem que ter

\ um respawn das moedas de crystal

\ o tempo é de 60 Minutos.

\------------------------------------------------------------------------------- /

Link para o comentário
Compartilhar em outros sites

11 respostass a esta questão

Posts Recomendados

  • 0

Além de estar meio confuso oque você quer, o titulo de seu tópico esta totalmente fora das regras, preste mais atenção antes de postar e tente exemplificar mais oque você deseja.

O titulo do tópico tem que ser relacionado as características do conteúdo, não podem ser usados "Help Aqui", "Ajuda Scripters" e outras coisas desse gênero.

Então estou trocando o titulo de seu tópico, na próxima vez tenha mais atenção.

 

@Edited,

 

Fiz o script pra você rapidinho.

Vai em data/actions/script, duplique qualquer arquivo desta pasta e nomeie para "minerar" sem as aspas, e nele cole:

local stonesMinerar = {
   [5709] = {minerioid=5944, quant=1}, -- [id da pedra] = {minerioid = id do item que ganha, quant = quantidade que ganha}
   [5624] = {minerioid=6277, quant=2},
   [8748] = {minerioid=5880, quant=1}
}

local config = {
   levelMin = 100, -- level minimo pra usar.
   exhaustionMinutes = 60, -- exausted em minutos
   effectChar = 30, -- efeito no char.
   storageUse = 34542 -- storage usado/ não mude caso não entenda.
}

function onUse(cid, item, fromPosition, itemEx, toPosition)

if(exhaustion.check(cid, config.storageUse) == TRUE) then
  if (exhaustion.get(cid, config.storageUse) >= 60) then
  doPlayerSendCancel(cid, "Voçê só pode usar após [" .. math.floor(exhaustion.get(cid, config.storageUse) / 60 + 1) .."] minutos.")
  end
   if (exhaustion.get(cid, config.storageUse) <= 60) then
   doPlayerSendCancel(cid, "Voçê só pode usar após [" .. exhaustion.get(cid, config.storageUse).."] segundos.")
   end
return true
end

if stonesMinerar[itemEx.itemid] then
   if getPlayerLevel(cid) >= config.levelMin then
       doPlayerAddItem(cid, stonesMinerar[itemEx.itemid].minerioid, stonesMinerar[itemEx.itemid].quant)
       doPlayerSendTextMessage(cid, 19, "Você recebeu "..(stonesMinerar[itemEx.itemid].quant).." "..getItemNameById(stonesMinerar[itemEx.itemid].minerioid).."!")
       doSendMagicEffect(getPlayerPosition(cid), config.effectChar)
       exhaustion.set(cid, config.storageUse, config.exhaustionMinutes*60)
   else
       doPlayerSendCancel(cid, "Apenas player com level "..config.levelMin.." ou superior podem minerar.")
   end
else
   doPlayerSendCancel(cid, "Você não pode minerar isso.")
end

return true
end

 

Agora em data/actions/actions.xml

Procure por essa linha:

<action itemid="2553" event="script" value="tools/pick.lua"/>

E troque por essa:

<action itemid="2553" event="script" value="minerar.lua"/>

 

Agora basta configurar oque você deseja no arquivo "minerar" e pronto.

Editado por Jhon992
Link para o comentário
Compartilhar em outros sites

  • 0

Não entendi

 

 

\ as rochas:1354 , depois de usadas, tem que ter

\ um respawn das moedas de crystal

\ o tempo é de 60 Minutos.

 

como assim um respawn?? depois q alguem usa uma rocha, qualquer pode usar nela dnv?? (o limite do jogador só poder usar 1 vez a 60 min eu ja fiz, mas cada pedra tem 1 limite tb?)

Link para o comentário
Compartilhar em outros sites

  • 0

cara tipo a cada 60 minutos o jogador pode tirar 1 crystal coin da rocha atraves da pickaxe, entendeu?

 

@edit

 

dai eu vo colocar as rochas em um map próprio

vai ter varias dessas rochas...

Editado por HarpiaLOOK
Link para o comentário
Compartilhar em outros sites

  • 0

actions~script crie arquivo com nome minerando.lua e cole isso


--==--Sistema de Mineração--==--
function onUse(cid, item, frompos, item2, topos)

difskill = 100 --Dificuldade do skill(quanto maior mais dificil)
dif =10000 --Dificuldade
skillid = 15895

--Minerando pedras preciosas
smallrand = math.random(1, 10)
if smallrand == 1 then
smallpremio = 2145 -- Small Diamond
elseif smallrand == 2 or smallrand == 3 then
smallpremio = 2146 -- Small Sapphire
elseif smallrand == 4 or smallrand == 5 then
smallpremio = 2147 -- Small Ruby
elseif smallrand == 6 or smallrand == 7 then
smallpremio = 2149 -- Small Emerald
else
smallpremio = 2150 -- Small Amethysh
end

--Minerando Gems
gemrand = math.random(1, 5)
if gemrand == 1 then
gempremio = 2153 -- Violet Gem
elseif gemrand == 2 then
gempremio = 2154 -- Yellow Gem
elseif gemrand == 3 then
gempremio = 2155 -- Big Emerald
elseif gemrand == 4 then
gempremio = 2156 -- Big Ruby
else
gempremio = 2158 -- Blue Gem
end

--Minerando Porcarias
porcrand = math.random(1,3)
if porcrand == 1 then
porcpremio = 1293 -- Stone
elseif porcrand == 2 then
porcpremio = 1294 -- Small Stone
else
porcpremio = 1295 -- Stone
end

--Minerando coisas legais
lglrand = math.random(1, 4)
if lglrand == 1 then
lglpremio = 2320 -- Skull
elseif lglrand == 2 then
lglpremio = 2151 -- Talon
elseif lglrand == 3 then
lglpremio = 2225 -- Piece of Iron
else
lglpremio = 2260 -- Blank Rune
end

rand = math.random(1, dif)
if item2.itemid == 356 or
item2.itemid == 357 or
item2.itemid == 358 or
item2.itemid == 359 or
item2.itemid == 360 or
item2.itemid == 361 or
item2.itemid == 362 or
item2.itemid == 363 or
item2.itemid == 364 or
item2.itemid == 365 or
item2.itemid == 366 or
item2.itemid == 367 or
item2.itemid == 371 or
item2.itemid == 372 or
item2.itemid == 373 or
item2.itemid == 374 or
item2.itemid == 375 or
item2.itemid == 376 or
item2.itemid == 378 or
item2.itemid == 379 or
item2.itemid == 380 or
item2.itemid == 381 or
item2.itemid == 382 then

if rand <= 50 then
doSendAnimatedText(topos,'Tck',210)
doSendMagicEffect(topos,3)
pedra = doPlayerAddItem(cid,porcpremio,1)
doSetItemSpecialDescription(pedra, "Minerado por "..getPlayerName(cid)..".")
AddSkill(cid,skillid,2)
elseif rand >50 and rand <= 70 then
doSendAnimatedText(topos,'Tuk',210)
doSendMagicEffect(topos,3)
pedra = doPlayerAddItem(cid,lglpremio,1)
doSetItemSpecialDescription(pedra, "Minerado por "..getPlayerName(cid)..".")
AddSkill(cid,skillid,2)
elseif rand >70 and rand <= 80 then
doSendAnimatedText(topos,'Tnk',210)
doSendMagicEffect(topos,3)
pedra = doPlayerAddItem(cid,smallpremio,1)
doSetItemSpecialDescription(pedra, "Minerado por "..getPlayerName(cid)..".")
AddSkill(cid,skillid,2)
elseif rand >80 and rand <= 85 then
doSendAnimatedText(topos,'Tnk',210)
doSendMagicEffect(topos,3)
pedra = doPlayerAddItem(cid,gempremio,1)
doSetItemSpecialDescription(pedra, "Minerado por "..getPlayerName(cid)..".")
AddSkill(cid,skillid,2)
else
doSendAnimatedText(topos,'Tin',210)
doSendMagicEffect(topos,2)
AddSkill(cid,skillid,1)
end
end
end

actions.xml

<action itemid="2553" script="minerando.lua" />

 

 

REP+?

Editado por Tchubaka
Link para o comentário
Compartilhar em outros sites

  • 0

teria que adc as tag's eu axo.


local config = {
levelMin = 100, -- level minimo pra usar.
exhaustionMinutes = 60, -- exausted em minutos
}

if(exhaustion.check(cid, config.storageUse) == TRUE) then
  if (exhaustion.get(cid, config.storageUse) >= 60) then
  doPlayerSendCancel(cid, "Voçê só pode usar após [" .. math.floor(exhaustion.get(cid, config.storageUse) / 60 + 1) .."] minutos.")
  end
if (exhaustion.get(cid, config.storageUse) <= 60) then
doPlayerSendCancel(cid, "Voçê só pode usar após [" .. exhaustion.get(cid, config.storageUse).."] segundos.")
end
return true
end


exhaustion.set(cid, config.storageUse, config.exhaustionMinutes*60)

Editado por Tchubaka
Link para o comentário
Compartilhar em outros sites

  • 0

Está dando erro no log:

Unable to load Actions:

 

Actions.xml

<?xml version="1.0" encoding="UTF-8"?>
<actions>
<!-- Quests -->
<action actionid="2000" script="quests/system.lua"/>
<action actionid="2001" script="quests/system.lua"/>
<action uniqueid="30015" script="quests/annihilator.lua"/>
<action uniqueid="7365" script="elf.lua"/>
<action uniqueid="7366" script="vampiro.lua"/>
    <action uniqueid="5457" script="quests/bonus.lua" />
    <action uniqueid="6191" script="quests/qss.lua" />
    <action uniqueid="2456" script="quests/chuquefoda.lua" />
    <action uniqueid="6959" script="quests/impossibru.lua" />
<!-- Sistema de Mineração -->
    <action itemid="7437" script="minerando.lua" />
<!-- Sistema Vip de armia -->
    <action itemid="2353" script="sistemavip.lua"/>
    <action actionid="13595" script="sistemavip.lua"/>
    <!-- Terra set -->
    <action uniqueid="1563" script="Aqs\questdepala\terraset01.lua"/>
    <action uniqueid="8624" script="Aqs\questdepala\terraset02.lua"/>
    <action uniqueid="8242" script="Aqs\questdepala\terraset03.lua"/>
    <action uniqueid="9722" script="Aqs\questdepala\terraset04.lua"/>
    <action uniqueid="6744" script="Aqs\questdepala\terraset05.lua"/>
    <action uniqueid="8547" script="Aqs\questdepala\terraset06.lua"/>

    <!-- Magma Set -->
    <action uniqueid="6642" script="Aqs\questdemage\magmaset01.lua"/>
    <action uniqueid="4723" script="Aqs\questdemage\magmaset02.lua"/>
    <action uniqueid="9461" script="Aqs\questdemage\magmaset03.lua"/>
    <action uniqueid="4530" script="Aqs\questdemage\magmaset04.lua"/>
    <action uniqueid="8894" script="Aqs\questdemage\magmaset05.lua"/>
    <action uniqueid="7548" script="Aqs\questdemage\magmaset06.lua"/>
    <!-- Crown Set -->
    <action uniqueid="1578" script="Aqs\questdekina\crownset01.lua"/>
    <action uniqueid="4110" script="Aqs\questdekina\crownset02.lua"/>
    <action uniqueid="4268" script="Aqs\questdekina\crownset03.lua"/>
    <action uniqueid="9981" script="Aqs\questdekina\crownset04.lua"/>
    <action uniqueid="1125" script="Aqs\questdekina\crownset05.lua"/>
    <action uniqueid="6659" script="Aqs\questdekina\crownclub.lua"/>
    <action uniqueid="2780" script="Aqs\questdekina\crownsword.lua"/>
    <action uniqueid="3491" script="Aqs\questdekina\crownaxe.lua"/>
<!-- Tools -->
<action itemid="2420" script="tools/machete.lua"/>
<action itemid="2345" script="spy.lua"/>
<action itemid="2550" script="tools/scythe.lua"/>
<action itemid="2580" script="tools/fishing.lua" allowfaruse="1"/>
<action itemid="2554" script="tools/shovel.lua"/>
<action itemid="5710" script="tools/shovel.lua"/>
<action itemid="2120" script="tools/rope.lua"/>
<action itemid="2553" script="tools/pick.lua"/>
<action itemid="5942" script="tools/blessed_wooden_stake.lua"/>
<action itemid="5908" script="tools/obsidian_knife.lua"/>
<action uniqueid="5396" script="fusion.lua"/>
<action uniqueid="62387" script="ferumbrasoftower.lua"/>
<!-- Cassino -->
<action uniqueid="6297" script="cassino.lua"/>
<action uniqueid="6298" script="cassino2.lua"/>
<!-- Liquids -->
<action itemid="1775" script="liquids/containers.lua"/>
<action itemid="2005" script="liquids/containers.lua"/>
<action itemid="2006" script="liquids/containers.lua"/>
<action itemid="2007" script="liquids/containers.lua"/>
<action itemid="2008" script="liquids/containers.lua"/>
<action itemid="2009" script="liquids/containers.lua"/>
<action itemid="2011" script="liquids/containers.lua"/>
<action itemid="2012" script="liquids/containers.lua"/>
<action itemid="2013" script="liquids/containers.lua"/>
<action itemid="2014" script="liquids/containers.lua"/>
<action itemid="2015" script="liquids/containers.lua"/>
<action itemid="2023" script="liquids/containers.lua"/>
<action itemid="2031" script="liquids/containers.lua"/>
<action itemid="2032" script="liquids/containers.lua"/>
<action itemid="2033" script="liquids/containers.lua"/>
<action itemid="2034" script="liquids/containers.lua"/>
<action itemid="2562" script="liquids/containers.lua"/>
<action itemid="2574" script="liquids/containers.lua"/>
<action itemid="2575" script="liquids/containers.lua"/>
<action itemid="2576" script="liquids/containers.lua"/>
<action itemid="2577" script="liquids/containers.lua"/>
<action itemid="3941" script="liquids/containers.lua"/>
<action itemid="3942" script="liquids/containers.lua"/>
<action itemid="5553" script="liquids/containers.lua"/>
<action itemid="6558" script="liquids/demonic_blood.lua"/>
	 <action itemid="7588-7591;8472-8473;7618;7620;8704" event="script" value="liquids/potions.lua"/>

<!-- Food -->
<action fromid="2362" toid="2363" script="other/food.lua"/>
<action fromid="2666" toid="2691" script="other/food.lua"/>
<action fromid="2695" toid="2696" script="other/food.lua"/>
<action fromid="2787" toid="2796" script="other/food.lua"/>
<action itemid="5097" script="other/food.lua"/>
<action itemid="6125" script="other/food.lua"/>
<action itemid="6278" script="other/food.lua"/>
<action itemid="6279" script="other/food.lua"/>
<action itemid="6394" script="other/food.lua"/>
<action itemid="6501" script="other/food.lua"/>
<action fromid="6541" toid="6545" script="other/food.lua"/>
<action itemid="6569" script="other/food.lua"/>
<action itemid="6574" script="other/food.lua"/>
<action itemid="7158" script="other/food.lua"/>
<action itemid="7159" script="other/food.lua"/>
<action itemid="8840" script="other/food.lua"/>
<action fromid="7372" toid="7377" script="other/food.lua"/>

<!-- Increase/Decrease ItemId -->
<action itemid="1873" function="increaseItemId"/>
<action itemid="1874" function="decreaseItemId"/>
<action itemid="1875" function="increaseItemId"/>
<action itemid="1876" function="decreaseItemId"/>
<action itemid="2162" function="increaseItemId"/>
<action itemid="2163" function="decreaseItemId"/>
<action itemid="3743" function="increaseItemId"/>
<action itemid="3744" function="decreaseItemId"/>
<action itemid="3947" function="increaseItemId"/>
<action itemid="3948" function="decreaseItemId"/>
<action itemid="1479" function="increaseItemId"/>
<action itemid="1480" function="decreaseItemId"/>
<action itemid="1945" function="increaseItemId"/>
<action itemid="1946" function="decreaseItemId"/>
<action itemid="2037" function="increaseItemId"/>
<action itemid="2038" function="decreaseItemId"/>
<action itemid="2039" function="increaseItemId"/>
<action itemid="2040" function="decreaseItemId"/>
<action itemid="2058" function="increaseItemId"/>
<action itemid="2059" function="decreaseItemId"/>
<action itemid="2060" function="increaseItemId"/>
<action itemid="2061" function="decreaseItemId"/>
<action itemid="2066" function="increaseItemId"/>
<action itemid="2067" function="decreaseItemId"/>
<action itemid="2068" function="increaseItemId"/>
<action itemid="2069" function="decreaseItemId"/>
<action itemid="2064" function="increaseItemId"/>
<action itemid="2065" function="decreaseItemId"/>
<action itemid="2578" function="increaseItemId"/>
<action itemid="2096" function="increaseItemId"/>
<action itemid="2097" function="decreaseItemId"/>
<action itemid="1786" function="increaseItemId"/>
<action itemid="1787" function="decreaseItemId"/>
<action itemid="1788" function="increaseItemId"/>
<action itemid="1789" function="decreaseItemId"/>
<action itemid="1790" function="increaseItemId"/>
<action itemid="1791" function="decreaseItemId"/>
<action itemid="1792" function="increaseItemId"/>
<action itemid="1793" function="decreaseItemId"/>
<action itemid="1634" function="increaseItemId"/>
<action itemid="1635" function="decreaseItemId"/>
<action itemid="1636" function="increaseItemId"/>
<action itemid="1637" function="decreaseItemId"/>
<action itemid="1638" function="increaseItemId"/>
<action itemid="1639" function="decreaseItemId"/>
<action itemid="1640" function="increaseItemId"/>
<action itemid="1641" function="decreaseItemId"/>
<action itemid="7058" function="increaseItemId"/>
<action itemid="7059" function="decreaseItemId"/>
<!-- Spellbooks -->
<action itemid="2175" script="other/spellbook.lua"/>
<action itemid="6120" script="other/spellbook.lua"/>
<action fromid="8900" toid="8904" script="other/spellbook.lua"/>
<action itemid="8918" script="other/spellbook.lua"/>
<!-- Other -->
<action itemid="6578" script="other/partyhat.lua"/>
		    <action itemid="2114" script="other/piggybank.lua"/>
			  <action itemid="4852" script="other/telecvip.lua"/>
<action fromid="6570" toid="6571" script="other/surprisebag.lua"/>
<action itemid="6576" script="other/fireworksrocket.lua"/>
<action itemid="2036" script="other/watch.lua"/>
    <action itemid="4598" script="other/alavanca.lua"/>
	 <action fromid="1728" toid="1731" script="other/watch.lua"/>
<action itemid="6572" script="other/partytrumpet.lua"/>
<action itemid="2785" script="other/blueberrybush.lua"/>
<action itemid="2579" script="other/trap.lua"/>
<action itemid="2148" script="other/changegold.lua"/>
<action itemid="2152" script="other/changegold.lua"/>
<action itemid="2160" script="other/changegold.lua"/>
<action fromid="3901" toid="3938" script="other/constructionkits.lua"/>
<action fromid="2070" toid="2078" script="other/music.lua"/>
<action fromid="2080" toid="2085" script="other/music.lua"/>
<action itemid="2332" script="other/music.lua"/>
<action itemid="2364" script="other/music.lua"/>
<action fromid="2367" toid="2368" script="other/music.lua"/>
<action fromid="2370" toid="2373" script="other/music.lua"/>
<action fromid="2041" toid="2042" script="other/decayto.lua"/>
<action fromid="2044" toid="2045" script="other/decayto.lua"/>
<action fromid="2047" toid="2048" script="other/decayto.lua"/>
<action fromid="2050" toid="2055" script="other/decayto.lua"/>
<action itemid="430" script="other/teleport.lua"/>
<action itemid="1369" script="other/teleport.lua"/>
<action itemid="1386" script="other/teleport.lua"/>
<action itemid="3678" script="other/teleport.lua"/>
<action itemid="5543" script="other/teleport.lua"/>
<action fromid="2376" toid="2404" script="other/destroy.lua"/>
<action fromid="2406" toid="2419" script="other/destroy.lua"/>
<action fromid="2421" toid="2453" script="other/destroy.lua"/>
<action fromid="5792" toid="5797" script="other/dice.lua"/>
<action itemid="2692" script="other/createbread.lua"/>
<action itemid="2694" script="other/createbread.lua"/>
<action fromid="6436" toid="6447" script="other/windows.lua"/>
<action fromid="6450" toid="6473" script="other/windows.lua"/>
<action fromid="6788" toid="6791" script="other/windows.lua"/>
<action fromid="7025" toid="7032" script="other/windows.lua"/>
<action fromid="1219" toid="1262" script="other/doors.lua"/>
<action fromid="1539" toid="1542" script="other/doors.lua"/>
<action fromid="2086" toid="2092" script="other/doors.lua"/>
<action fromid="3535" toid="3552" script="other/doors.lua"/>
<action fromid="4913" toid="4918" script="other/doors.lua"/>
<action fromid="5082" toid="5085" script="other/doors.lua"/>
<action fromid="5098" toid="5145" script="other/doors.lua"/>
<action fromid="5278" toid="5295" script="other/doors.lua"/>
<action fromid="5515" toid="5518" script="other/doors.lua"/>
<action fromid="5732" toid="5737" script="other/doors.lua"/>
<action fromid="5745" toid="5749" script="other/doors.lua"/>
<action fromid="6192" toid="6209" script="other/doors.lua"/>
<action fromid="6249" toid="6266" script="other/doors.lua"/>
<action fromid="6795" toid="6802" script="other/doors.lua"/>
<action fromid="6891" toid="6908" script="other/doors.lua"/>
<action fromid="7033" toid="7050" script="other/doors.lua"/>
<action fromid="7054" toid="7057" script="other/doors.lua"/>
<action fromid="8541" toid="8558" script="other/doors.lua"/>
<action fromid="9165" toid="9184" script="other/doors.lua"/>
<action fromid="9267" toid="9186" script="other/doors.lua"/>
<action itemid="5791" script="other/stuffeddragon.lua"/>
<action itemid="6566" script="other/stuffeddragon.lua"/>
<action itemid="1877" script="other/watch.lua"/>
<action uniqueid="1945" script="arenalever.lua" />

<action itemid="1857" script="tapestries.lua"  />
<action itemid="1860" script="tapestries.lua"  />
<action itemid="1863" script="tapestries.lua"  />
<action itemid="1866" script="tapestries.lua"  />
<action itemid="1869" script="tapestries.lua"  />
<action itemid="1872" script="tapestries.lua"  />
<action itemid="1880" script="tapestries.lua"  />
<action itemid="5616" script="tapestries.lua"  />
<action itemid="1855" script="tapestries.lua"  />
<action itemid="1858" script="tapestries.lua"  />
<action itemid="1861" script="tapestries.lua"  />
<action itemid="1864" script="tapestries.lua"  />
<action itemid="1867" script="tapestries.lua"  />
<action itemid="1870" script="tapestries.lua"  />
<action itemid="1878" script="tapestries.lua"  />
<action itemid="5614" script="tapestries.lua"  />
<action itemid="1856" script="tapestries.lua"  />
<action itemid="1859" script="tapestries.lua"  />
<action itemid="1862" script="tapestries.lua"  />
<action itemid="1865" script="tapestries.lua"  />
<action itemid="1868" script="tapestries.lua"  />
<action itemid="1871" script="tapestries.lua"  />
<action itemid="1879" script="tapestries.lua"  />
<action itemid="5615" script="tapestries.lua"  />
<action uniqueid="9090" script="Axe.lua" />
<action uniqueid="9010" script="fogo.lua" />
<action uniqueid="9011" script="gelo.lua" />
<action uniqueid="9012" script="terra.lua" />
<action uniqueid="9013" script="energia.lua" />
<action itemid="427" script="teleport.lua" />
<action itemid="408" script="teleport.lua" />
<action itemid="409" script="teleport.lua" />
<action itemid="410" script="teleport.lua" />
<action itemid="411" script="teleport.lua" />
<action itemid="423" script="teleport.lua" />
<action itemid="428" script="teleport.lua" />
<action itemid="429" script="teleport.lua" />
<action itemid="432" script="teleport.lua" />
<action itemid="479" script="teleport.lua" />
<action itemid="480" script="teleport.lua" />
<action itemid="482" script="teleport.lua" />
<action itemid="484" script="teleport.lua" />
<action itemid="485" script="teleport.lua" />
<action itemid="489" script="teleport.lua" />
<action itemid="493" script="teleport.lua" />
<action itemid="294" script="teleport.lua" />
<action itemid="469" script="teleport.lua" />
<action itemid="470" script="teleport.lua" />
<action itemid="385" script="teleport.lua" />
<action itemid="383" script="teleport.lua" />
<action itemid="392" script="teleport.lua" />
<action itemid="2261" script="destroyfield.lua" allowfaruse="1" />
<!-- simple quests -->
<action itemid="1747" script="quest.lua" />
<action itemid="1748" script="quest.lua" />
<action itemid="1770" script="quest.lua" />
<!-- other quests -->
<action uniqueid="5006" script="quests/anihi.lua" />
<action uniqueid="5252" script="transdec.lua" /> --cuckoo clock--
<action uniqueid="5007" script="quests/anihi.lua" />
<action uniqueid="2121" script="alavancca.lua" />
<action uniqueid="5008" script="quests/anihi.lua" />
<action uniqueid="5009" script="quests/anihi.lua" />
<action uniqueid="1001" script="demonhelmet.lua" />
<action uniqueid="1604" script="bonus.lua" />
<action uniqueid="1606" script="bonus2.lua" />
<action uniqueid="1804" script="amulet.lua" />
<action uniqueid="1805" script="vip2.lua" />
<action uniqueid="13541" script="vipchest.lua" />
<action uniqueid="1701" script="vipquest.lua" />
<action uniqueid="1702" script="vipquest.lua" />
<action uniqueid="1703" script="vipquest.lua" />
<action uniqueid="1704" script="vipquest.lua" />
<action uniqueid="1705" script="vipquest.lua" />
<action uniqueid="1706" script="vipquest.lua" />
<action uniqueid="1002" script="demonhelmet.lua" />
<action uniqueid="1003" script="demonhelmet.lua" />
<action uniqueid="7502" script="necrochest.lua" />
<action uniqueid="7503" script="necrochest.lua" />
<action uniqueid="7510" script="dwarfschest.lua" />
<action uniqueid="7511" script="dwarfschest.lua" />
<action uniqueid="7512" script="dwarfschest.lua" />
<action uniqueid="7513" script="dwarfschest.lua" />
<action uniqueid="7944" script="quests/firewalker.lua" />
<action uniqueid="4787" script="quests/boots.lua" />
<action uniqueid="2000" script="switchdemon.lua" />
<action uniqueid="1550" script="paredered.lua" />
<action uniqueid="1559" script="questred.lua" />
<action uniqueid="1552" script="questala1.lua" />
<action uniqueid="1553" script="questala2.lua" />
<action uniqueid="1551" script="paredeverde.lua" />
<action uniqueid="1360" script="questvip.lua" />
<action uniqueid="1361" script="questvip.lua" />
<action uniqueid="1362" script="questvip.lua" />
<action uniqueid="7771" script="putz.lua" />
<action uniqueid="2009" script="questa.lua" />
<action uniqueid="2008" script="questo.lua" />
<action uniqueid="5003" script="pharaochest.lua" />
<action uniqueid="5004" script="pharaochest.lua" />
<action uniqueid="5017" script="pharaochest.lua" />
<action uniqueid="5000" script="behechest.lua" />
<action uniqueid="7002" script="steerwheel.lua" />
<action uniqueid="7003" script="steerwheel.lua" />
<action uniqueid="9001" script="orcinvasion.lua" />
<action uniqueid="9002" script="demoninvasion.lua" />
<action uniqueid="9003" script="dragoninvasion.lua" />
<action uniqueid="9004" script="undeadinvasion.lua" />
-----begin bryan scripts-----
<action uniqueid="3021" script="hellhounds.lua" />
<action itemid="2307" script="firerune.lua" allowfaruse="1" />
<action uniqueid="7964" script="posso.lua" />
<action uniqueid="7966" script="inferno_back.lua" />
<action uniqueid="7965" script="inferno.lua" />
<action actionid="4211" script="trainroom.lua" />
<action actionid="4212" script="trainroom.lua" />
<action actionid="4213" script="trainroom.lua" />
<action actionid="4214" script="trainroom.lua" />
<action itemid="4846" script="craftleather.lua" />
<action itemid="2557" script="craftdwarven.lua" />
<action itemid="2556" script="craftknight.lua" />
<action uniqueid="3002" script="fullset.lua" />
<action uniqueid="3003" script="fullset2.lua" />
<action uniqueid="5058" script="pitschest.lua" />
<action uniqueid="5059" script="pitschest.lua" />
<action uniqueid="5060" script="pitschest.lua" />
<action actionid="1515" script="tools/greatmp.lua"/>
<action actionid="1516" script="tools/greathp.lua"/>
<action actionid="1517" script="tools/healthpotion.lua"/>
<action actionid="1518" script="tools/manapotion.lua"/>
<action actionid="1519" script="tools/stronghp.lua"/>
<action actionid="1520" script="tools/strongmp.lua"/>
<action actionid="1521" script="tools/spiritpotion.lua"/>
<action actionid="1522" script="tools/ultimatehp.lua"/>
<action actionid="1523" script="mmp.lua"/>
<action actionid="1524" script="bsp.lua"/>
<action actionid="1525" script="bup.lua"/>
<action actionid="1001" script="quests/test.lua" />
<action actionid="1002" script="quests/testq.lua" />
<action uniqueid="5957" script="quests/poichest.lua"/>
<action uniqueid="5956" script="quests/poichest.lua"/>
<action uniqueid="5955" script="quests/poichest.lua"/>
<action uniqueid="5954" script="quests/poichest.lua"/>
<action uniqueid="5953" script="quests/poichest.lua"/>
<action uniqueid="10000" script="quests/Avenger.lua"/>
<action uniqueid="10001" script="quests/Arcane Staff.lua"/>
<action uniqueid="10002" script="quests/Arbalest.lua"/>
<action uniqueid="10003" script="quests/Backpack of Holding.lua"/>
<action uniqueid="10004" script="quests/Money.lua"/>
<action uniqueid="10005" script="quests/Soft Boots.lua"/>
<action uniqueid="10006" script="quests/Stuffed Dragon.lua"/>
<action uniqueid="10007" script="quests/Teddy Bear.lua"/>
<action uniqueid="10008" script="quests/golden helmet.lua"/>
<action uniqueid="10009" script="quests/emerald sword.lua"/>
<action uniqueid="10010" script="quests/spellbook of dark mysteries.lua"/>
<action uniqueid="10011" script="quests/master archer's armor.lua"/>
<action uniqueid="10012" script="quests/robe of the underworld.lua"/>
<action uniqueid="10013" script="quests/fireborn giant armor.lua"/>
<action uniqueid="10014" script="quests/obsidian truncher.lua"/>
<action uniqueid="10015" script="quests/royal crossbow.lua"/>
<action uniqueid="10016" script="quests/warsinger bow.lua"/>
<action uniqueid="10017" script="quests/hellforged axe.lua"/>
<action uniqueid="10018" script="quests/Baiak Helmet.lua"/>
<action uniqueid="10019" script="quests/Baiak of Boots.lua"/>
<action uniqueid="10020" script="quests/Baiak Armor.lua"/>
<action uniqueid="7000" script="quests/anihi.lua" />
<action uniqueid="5952" script="quests/begin_chest.lua"/>
<action uniqueid="5951" script="quests/begin_chest.lua"/>
<action uniqueid="5950" script="quests/begin_chest.lua"/>
<action uniqueid="5949" script="quests/begin_chest.lua"/>
<action uniqueid="5948" script="quests/begin_chest.lua"/>
<action uniqueid="5947" script="quests/begin_chest.lua"/>
<action uniqueid="5946" script="quests/begin_chest.lua"/>
<action uniqueid="5990" script="quests/grin armor.lua"/>
<action uniqueid="5901" script="quests/robe.lua"/>
<action uniqueid="5910" script="quests/ele.lua"/>
<action uniqueid="5991" script="quests/grim quest.lua"/>
<action uniqueid="5992" script="quests/frost quest.lua"/>
<action uniqueid="5433" script="quests/frost cap.lua"/>
<action uniqueid="15873" script="quests/blessed.lua"/>
<action uniqueid="5970" script="quests/dez.lua"/>
<action itemid="10022" script="other/firewalker.lua"/>
<action uniqueid="5500" script="quests/questsss.lua"/>
<action uniqueid="5200" script="quests/questsss.lua"/>
<action uniqueid="5300" script="quests/questsss.lua"/>
<action uniqueid="5400" script="quests/questsss.lua"/>
<action uniqueid="5889" script="quests/terra.lua"/>
<action uniqueid="5877" script="quests/winged.lua"/>
<action uniqueid="5882" script="quests/terrab.lua"/>
<action fromid="9268" toid="9269" script="other/doors.lua"/>
<action itemid="2146" script="other/enchant.lua" />
<action itemid="2147" script="other/enchant.lua" />
<action itemid="2150" script="other/enchant.lua" />
<action itemid="2149" script="other/enchant.lua" />
<action itemid="7759" script="other/enchant.lua" />
<action itemid="7760" script="other/enchant.lua" />
<action itemid="7761" script="other/enchant.lua" />
<action itemid="7762" script="other/enchant.lua" />
<action uniqueid="8001" script="quests/arena.lua" />
<action uniqueid="8888" script="quests/goarena.lua" />
<action uniqueid="6013" script="quests/warlord.lua" />
<action uniqueid="6009" script="quests/warlord.lua" />
<action uniqueid="6010" script="quests/warlord.lua" />
<action uniqueid="6011" script="quests/warlord.lua" />
<action uniqueid="6012" script="quests/warlord.lua" />
<action uniqueid="9966" script="quests/quest level.lua" />
<!-- demon oak -->
<action itemid="8293" script="tools/Hallowed Axe.lua"/>
<action uniqueid="12901" script="quests/DOQChests.lua" />
<action uniqueid="12902" script="quests/DOQChests.lua" />
<action uniqueid="12903" script="quests/DOQChests.lua" />
<action uniqueid="12904" script="quests/DOQChests.lua" />
<action uniqueid="5908" script="quests/DOQgravestone.lua"/>
<action uniqueid="3561" script="quests/estatua.lua" />
<!-- POI -->
<action uniqueid="4058" script="quests/poix.lua" />
<action uniqueid="4060" script="quests/poix.lua" />
<action uniqueid="4066" script="quests/poix.lua" />
<action uniqueid="4062" script="quests/poix.lua" />
<action uniqueid="4064" script="quests/poix.lua" />
<action uniqueid="9192" script="other/poi1.lua" />
<action uniqueid="9193" script="other/poi2.lua" />
<action uniqueid="9194" script="other/poi3.lua" />
<action uniqueid="9195" script="other/poi4.lua" />
<action uniqueid="9978" script="quests/infernal.lua" />
<action uniqueid="9980" script="quests/hota.lua" />
<action uniqueid="8883" script="quests/obsidian.lua"/>
<action uniqueid="4546" script="quests/guardian.lua"/>
<action uniqueid="4549" script="quests/hallowed.lua"/>
<action itemid="10223" event="script" value="tools/mechanical_fishing.lua" allowfaruse="1"/>
action fromid="10511" toid="10516" event="script" value="tools/all.lua"/>
<action itemid="9930" event="script" value="tools/rust_remover.lua"/>
<!-- SvargrondArena -->
   <action actionid="42366" script="quests/arenadoors.lua"/>
   <action actionid="42376" script="quests/arenadoors.lua"/>
   <action actionid="42386" script="quests/arenadoors.lua"/>
   <action actionid="42357" script="quests/arenadoors.lua"/>
   <action actionid="42361" script="quests/arenareward.lua"/>
   <action actionid="42362" script="quests/arenareward.lua"/>
   <action actionid="42363" script="quests/arenareward.lua"/>
   <action actionid="42364" script="quests/arenareward.lua"/>
   <action actionid="42365" script="quests/arenareward.lua"/>
   <action actionid="42371" script="quests/arenareward.lua"/>
   <action actionid="42372" script="quests/arenareward.lua"/>
   <action actionid="42373" script="quests/arenareward.lua"/>
   <action actionid="42374" script="quests/arenareward.lua"/>
   <action actionid="42375" script="quests/arenareward.lua"/>
   <action actionid="42381" script="quests/arenareward.lua"/>
   <action actionid="42382" script="quests/arenareward.lua"/>
   <action actionid="42383" script="quests/arenareward.lua"/>
   <action actionid="42384" script="quests/arenareward.lua"/>
   <action actionid="42385" script="quests/arenareward.lua"/>
<action itemid="10269" script="other/doors.lua"/>
<action itemid="10270" script="other/doors.lua"/>
<action itemid="10272" script="other/doors.lua"/>
<action itemid="10273" script="other/doors.lua"/>
<action itemid="10274" script="other/doors.lua"/>
<action itemid="10275" script="other/doors.lua"/>
<action itemid="10276" script="other/doors.lua"/>
<action itemid="10277" script="other/doors.lua"/>
<action itemid="10278" script="other/doors.lua"/>
<action itemid="10279" script="other/doors.lua"/>
<action itemid="10280" script="other/doors.lua"/>
<action itemid="10281" script="other/doors.lua"/>
<action itemid="10282" script="other/doors.lua"/>
<action itemid="10283" script="other/doors.lua"/>
<action itemid="10284" script="other/doors.lua"/>
<action itemid="10285" script="other/doors.lua"/>
<action itemid="10469" script="other/doors.lua"/>
<action itemid="10470" script="other/doors.lua"/>
<action itemid="10471" script="other/doors.lua"/>
<action itemid="10472" script="other/doors.lua"/>
<action itemid="10473" script="other/doors.lua"/>
<action itemid="10474" script="other/doors.lua"/>
<action itemid="10475" script="other/doors.lua"/>
<action itemid="10476" script="other/doors.lua"/>
<action itemid="10478" script="other/doors.lua"/>
<action itemid="10479" script="other/doors.lua"/>
<action itemid="10480" script="other/doors.lua"/>
<action itemid="10481" script="other/doors.lua"/>
<action itemid="10482" script="other/doors.lua"/>
<action itemid="10483" script="other/doors.lua"/>
<action itemid="10484" script="other/doors.lua"/>
<action itemid="10485" script="other/doors.lua"/>
<action uniqueid="8735" script="quests/piratedoor.lua"/>
<action uniqueid="8215" script="quests/questim.lua"/>
<action uniqueid="6564" script="quests/dominio-de-castelo.lua"/> --- Primeiro Castelo
<action uniqueid="6565" script="quests/dominio-de-castelo.lua"/> --- Segundo Castelo
<action uniqueid="6460" script="quests/dominio-de-castelo.lua"/> --- Terceiro Castelo
<action uniqueid="6461" script="quests/dominio-de-castelo.lua"/> --- Quarto Castelo
<action uniqueid="6462" script="quests/dominio-de-castelo.lua"/> --- Quinto Castelo
<action uniqueid="6560" script="quests/dominio-de-castelo.lua"/> --- Alavanca Resetadora
<action uniqueid="55100" event="script" value="demonOakGravestone.lua" />
<action itemid="2719" script="escondido.lua" />
<action itemid="8306" script="other/upgrade.lua"/>
<action itemid="1967" script="scroll.lua"/>
</actions>

 

 

minerando.lua

function onUse(cid, item, frompos, item2, topos)
difskill = 100 --Dificuldade do skill(quanto maior mais dificil)
dif =10000 --Dificuldade
skillid = 15895
--Minerando pedras preciosas
smallrand = math.random(1, 10)
if smallrand == 1 then
smallpremio = 2145 -- Small Diamond
elseif smallrand == 2 or smallrand == 3 then
smallpremio = 2146 -- Small Sapphire
elseif smallrand == 4 or smallrand == 5 then
smallpremio = 2147 -- Small Ruby
elseif smallrand == 6 or smallrand == 7 then
smallpremio = 2149 -- Small Emerald
else
smallpremio = 2150 -- Small Amethysh
end
--Minerando Gems
gemrand = math.random(1, 5)
if gemrand == 1 then
gempremio = 2153 -- Violet Gem
elseif gemrand == 2 then
gempremio = 2154 -- Yellow Gem
elseif gemrand == 3 then
gempremio = 2155 -- Big Emerald
elseif gemrand == 4 then
gempremio = 2156 -- Big Ruby
else
gempremio = 2158 -- Blue Gem
end
--Minerando Porcarias
porcrand = math.random(1,3)
if porcrand == 1 then
porcpremio = 1293 -- Stone
elseif porcrand == 2 then
porcpremio = 1294 -- Small Stone
else
porcpremio = 1295 -- Stone
end
--Minerando coisas legais
lglrand = math.random(1, 4)
if lglrand == 1 then
lglpremio = 2320 -- Skull
elseif lglrand == 2 then
lglpremio = 2151 -- Talon
elseif lglrand == 3 then
lglpremio = 2225 -- Piece of Iron
else
lglpremio = 2260 -- Blank Rune
end
rand = math.random(1, dif)
if item2.itemid == 356 or
item2.itemid == 357 or
item2.itemid == 358 or
item2.itemid == 359 or
item2.itemid == 360 or
item2.itemid == 361 or
item2.itemid == 362 or
item2.itemid == 363 or
item2.itemid == 364 or
item2.itemid == 365 or
item2.itemid == 366 or
item2.itemid == 367 or
item2.itemid == 371 or
item2.itemid == 372 or
item2.itemid == 373 or
item2.itemid == 374 or
item2.itemid == 375 or
item2.itemid == 376 or
item2.itemid == 378 or
item2.itemid == 379 or
item2.itemid == 380 or
item2.itemid == 381 or
item2.itemid == 382 then
if rand <= 50 then
doSendAnimatedText(topos,'Tck',210)
doSendMagicEffect(topos,3)
pedra = doPlayerAddItem(cid,porcpremio,1)
doSetItemSpecialDescription(pedra, "Minerado por "..getPlayerName(cid)..".")
AddSkill(cid,skillid,2)
elseif rand >50 and rand <= 70 then
doSendAnimatedText(topos,'Tuk',210)
doSendMagicEffect(topos,3)
pedra = doPlayerAddItem(cid,lglpremio,1)
doSetItemSpecialDescription(pedra, "Minerado por "..getPlayerName(cid)..".")
AddSkill(cid,skillid,2)
elseif rand >70 and rand <= 80 then
doSendAnimatedText(topos,'Tnk',210)
doSendMagicEffect(topos,3)
pedra = doPlayerAddItem(cid,smallpremio,1)
doSetItemSpecialDescription(pedra, "Minerado por "..getPlayerName(cid)..".")
AddSkill(cid,skillid,2)
elseif rand >80 and rand <= 85 then
doSendAnimatedText(topos,'Tnk',210)
doSendMagicEffect(topos,3)
pedra = doPlayerAddItem(cid,gempremio,1)
doSetItemSpecialDescription(pedra, "Minerado por "..getPlayerName(cid)..".")
AddSkill(cid,skillid,2)
else
doSendAnimatedText(topos,'Tin',210)
doSendMagicEffect(topos,2)
AddSkill(cid,skillid,1)
end
end
end

 

Vou testar o seu jhon..

grato

 

Obrigado Jhon o seu deu certo

rep+!

-------------------------------------------

TOPICO FECHADO

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...