Forum TIBIA!OTS! i nie tylko! Strona Główna
  Obecny czas to Sob 16:03, 20 Kwi 2024   

Forum TIBIA!OTS! i nie tylko! Strona Główna -> Scrypty

Zostan Archeologiem :P

  Autor    Temat Napisz nowy temat Odpowiedz do tematu
Alfons II
Stały Gość



Dołączył: 17 Lis 2005
Posty: 59 Przeczytał: 0 tematów

Ostrzeżeń: 1/10
Skąd: KRAKÓW !!!

Zostan Archeologiem :P

Skrypt ten sprawia, że możesz wykopać kilofem z ziemi potwory i różne minerały... jest do tego potrzebny lvl oraz skill cluba jaki sobie ustawisz.


No to lecimy... dodaj to do swojego actions.xml:
<action itemid="3394" script="mining.lua" />


A teraz stwórz pliczek mining.lua i wklej do niego TO:

-- Mining V2.0
-- Coded by Roman, some credits to twiz for giving an example of his V1.0
-- Converted/Edited by grimmed for 7.5
function onUse(cid, item, frompos, item2, topos)
LevelToMine = getPlayerLevel(cid)
ClubSkillToMine = getPlayerSkill(cid,1)
if
LevelToMine >= 20 -- lvl required to mine
and
ClubSkillToMine >= 20 -- club skill level to mine
and
item2.itemid == 1817 or item2.itemid == 1818 or item2.itemid == 1819 or item2.itemid == 1820 or item2.itemid ==
1782 or item2.itemid == 1783 or item2.itemid == 1784 or item2.itemid == 1785 or item2.itemid == 1786 or
item2.itemid == 1787 or item2.itemid == 1788 or item2.itemid == 1789 or item2.itemid == 1790 or item2.itemid ==
1791 or item2.itemid == 1792 or item2.itemid == 1793 or item2.itemid == 1794 or item2.itemid == 1795 or
item2.itemid == 1809 or item2.itemid == 1810 or item2.itemid == 1811 or item2.itemid == 1812 then
rand = math.random(1,2000)
if rand < 20 then
doPlayerSendTextMessage(cid,22,"A stone golem came out of the pile of rocks!")
doSummonCreature("Stone Golem", topos)
elseif rand == 1300 then
doPlayerSendTextMessage(cid,22,"You have found a golden nugget.")
doPlayerAddItem(cid,2978,1)
elseif rand > 1995 then
doPlayerSendTextMessage(cid,22,"You have found a diamond.")
doPlayerAddItem(cid,2966,1)
elseif rand >600 and rand <800 then
doPlayerAddItem(cid,2969,Cool
elseif rand >800 and rand <1000 then
doPlayerAddItem(cid,2969,11)
elseif rand >1100 and rand <1300 then
doPlayerAddItem(cid,2969,23)
elseif rand >400 and rand <600 then
doPlayerAddItem(cid,2969,1Cool
elseif rand >1600 and rand <1800 then
doPlayerAddItem(cid,2969,6)
elseif rand >1200 and rand <1400 then
doPlayerAddItem(cid,2969,12)
elseif rand >800 and rand <1100 then
doPlayerAddHealth(cid,-40)
doPlayerSendTextMessage(cid,22,"You lost hitpoints due to exhaustion of mining.")
elseif rand >500 and rand <800 then
doPlayerSendTextMessage(cid,22,"You have found a gem.")
doPlayerAddItem(cid,2975,1)
elseif rand >550 and rand <800 then
doPlayerSendTextMessage(cid,22,"A fierce dwarf came out of the pile of rocks!")
doSummonCreature("Dwarf", topos)
elseif rand == 40 then
doPlayerSendTextMessage(cid,22,"A fierce dwarf guard came out of the pile of rocks!")
doSummonCreature("Dwarf Guard", topos)
elseif rand == 20 then
doPlayerSendTextMessage(cid,22,"A weak troll has appeared from the pile of rocks!")
doSummonCreature("Troll", topos)
elseif rand >2000 then
doPlayerSendTextMessage(cid,22,"Earthquake!")
doPlayerAddHealth(cid,-150)
elseif rand == 100 and rand <140 then
doPlayerSendTextMessage(cid,22,"A weak troll has appeared from the pile of rocks!")
doSummonCreature("Troll", topos)
elseif rand == 200 then
doPlayerSendTextMessage(cid,22,"A dwarf soldier came out of the pile of rocks!")
doSummonCreature("Dwarf Soldier", topos)
elseif rand >= 105 and rand <150 then
doRemoveItem(item.uid,1)
doSendMagicEffect(topos,2)
doPlayerSendTextMessage(cid,22,"Your pick has been heavily damaged and broke...")
end
doSendMagicEffect(topos,3)
doPlayerAddSkillTry(cid,1,1000)
else
doPlayerSendCancel(cid,"You do not have the required level or club skill level to mine.")
end
return 1
end




koloer czerwony odpowiada za level potrzebny do kopania

koloer zielony odpowada za skill cluba wymagadny do kopania


Post został pochwalony 0 razy

Post Czw 21:42, 17 Lis 2005 
 Zobacz profil autora    
  Wyświetl posty z ostatnich:      
Napisz nowy temat Odpowiedz do tematu

Skocz do:  


Last Thread | Next Thread  >

Zasady:
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach

 

fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB Š 2001 phpBB Group

phpBB Template by Vereor.

Web Templates
Web Design Templates Š