What's new
  • logo_cipsoft
    Latest servers:
    New servers will open on: 19th Feb 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Actions Mining System

Status
Not open for further replies.

Matt

Banned
Joined
May 9, 2013
Messages
595
Reaction score
45
Cze??.
Postanowi?em zn?w umie?ci? tutaj jeden z moich unikalnych skrypt?w, kt?ry pisa?em jaki? czas temu i nie jest mi on zbytnio potrzebny do ?ycia.

Autor: Oczywi?cie, ?e ja.
Opis: Dzia?anie skryptu jest praktycznie takie samo jak na filmiku Oskara.
Skrypt:

Wejd? do data/actions/scripts i podmie? ca?? zawarto?? pick.lua na t?:
[LUA]-- Mining System by Matt
oreid = 7201 -- id rudy zelaza, zlota, srebra
toId = 7202 -- do jakiego id ma sie zamienic dana ruda
giveItem = 7203 -- id stopu rudy, kt?ry otrzymuje gracz
storage = 152535 -- storage do exhuasta
text = {
[1] = {word="BAM", color=TEXTCOLOR_GREY},
[2] = {word="PUFF", color=TEXTCOLOR_GREY},
[3] = {word="POF BAM", color=TEXTCOLOR_GREY},
[4] = {word="PUK POF", color=TEXTCOLOR_GREY},
[5] = {word="PUFF BAM", color=TEXTCOLOR_GREY}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
local itemGround = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_GROUND})
if(isInArray(SPOTS, itemGround.itemid) and isInArray({354, 355}, itemEx.itemid)) then
doTransformItem(itemEx.uid, 392)
doDecayItem(itemEx.uid)

doSendMagicEffect(toPosition, CONST_ME_POFF)
return true
end

if(itemEx.itemid == 7200) then
doTransformItem(itemEx.uid, 7236)
doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
return true
end

if(itemEx.itemid == oreid) then
local getStorage, skill, rand = getPlayerStorageValue(cid, itemEx.uid), getPlayerSkill(cid, SKILL_CLUB), 0

if(skill >= 10 and skill < 50) then
rand = math.random(6, 15)
elseif(skill >= 50 and skill < 100) then
rand = math.random(6, 10)
elseif(skill >= 100 and skill < 150) then
rand = math.random(4, 8)
else
rand = math.random(2, 5)
end

if(getStorage > rand) then
doTransformItem(itemEx.uid, toId)
doPlayerAddItem(cid, giveItem, 1)
setPlayerStorageValue(cid, itemEx.uid, 0)
else
local talk, txt = math.random(1,5), text[talk]

if (not txt) then
return false
end

if exhaustion.get(cid, storage) then
seconds = math.floor(((exhaustion.get(cid, storage)) + 1))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..seconds.." seconds to use pick again.")
return false
end

exhaustion.set(cid, storage, 5)
setPlayerStorageValue(cid, itemEx.uid, getStorage + 1)
doSendMagicEffect(toPosition, CONST_ME_POFF)
doSendAnimatedText(toPosition, txt.word, txt.color)
return true
end
end
end[/LUA]

Pami?tajcie, aby ustawi? sobie dobrze wszystkie ID i og?lnie bo inaczej nie b?dzie dzia?a?.
Je?li pojawi? si? jakie? b??dy to prosz? pisa? bo nie pami?tam do ko?ca czy skrypt dzia?a? poprawnie.

Pozdrawiam,
Matt.
 

SanninStory

https://www.twitch.tv/sdrn
Joined
Oct 13, 2012
Messages
1,778
Reaction score
116
Odp: Mining System

Skrypt ciekawy.
Sam osobi?cie kiedy? napisa?em podobny.
Nie ma co, rep leci.
 

Kahras

Senior User
Joined
Aug 26, 2011
Messages
2,714
Reaction score
167
Age
26
Odp: Mining System

Skrypt przydatny - og?lnie fajnie ?e go udost?pni?e? za darmo.
Oby wi?cej takich skrypt?w na TNP si? znalaz?o:)
 

iSanto

Demetri-World.net
Joined
Jan 8, 2011
Messages
922
Reaction score
87
Odp: Mining System

Przydatny skrypcik. Zmodyfikuj? na swoje potrzeby i na pewno wykorzystam u siebie.
 

Egzo

Active User
Joined
Apr 11, 2009
Messages
80
Reaction score
6
Odp: Mining System

Ja bym jednak co? doda?: 1 soul point = 1 u?ycie kilofa aby ludzie u?ywaj?cy bot?w za ?atwo nie mieli.
 
Status
Not open for further replies.
Top