Nie tylko o Tibii i OTS...
Witam oto skrypt na bombę .Nie jest mój, ale bardzo zwrócił moją uwagę a więc:
Sposób działania:
Wygląda to tak: Stawiamy bombe C4 (przez 5 sekund standardowo) , nastepnie uciekamy xd. Po kolejnych 5 sekundach następuje wybuch. Pole rażenia 3x3 kratki , dmg~ 100-500
Krok pierwszy : Wchodzimy data/actions/scripts i tworzymy plik bomb.lua :
----------Plastic Bomb by Colex----------- local PLANTING_DELAY = 5 --seconds local EXPLOSION_DELAY = 5000 --milliseconds local MAX_HIT = 500 local MIN_HIT = 100 local PVP = true -- true for PVP, false for Non-PVP local PLAYERS = {} function isInArray(table, valor) for i,j in pairs(table) do if (j == valor) then return i end end return 0 end function explosion(info) area = { {0,0,0,0,0}, {0,1,1,1,0}, {0,1,1,1,0}, {0,1,1,1,0}, {0,0,0,0,0}, } hitpos = {x=info.pos.x, y=info.pos.y, z=info.pos.z, stackpos=253} center = {} center.y = math.floor(table.getn(area)/2)+1 for i in ipairs(area) do center.x = math.floor(table.getn(area[i])/2)+1 for j, v in ipairs(area[i]) do if (v == 1) then hitpos.x = info.pos.x + (j - center.x) hitpos.y = info.pos.y + (i - center.y) if (getTilePzInfo(hitpos) == 0) then victim = getThingfromPos(hitpos) effect = 4 if ((j == center.x) and (i == center.y)) then doSendAnimatedText(hitpos,"KABOOOOOM",TEXTCOLOR_RED) hitpoints = MAX_HIT effect = 5 else hitpoints = math.random(MIN_HIT,MAX_HIT) end if (isPlayer(victim.uid) == 1) then if (PVP == true) then doPlayerSendTextMessage(victim.uid,20,"You have lost "..hitpoints.." hitpoints by "..getPlayerName(info.player).."'s plastic bomb") else hitpoints = 0 end end if (isCreature(victim.uid) == 1) then doPlayerAddHealth(victim.uid,-hitpoints) end doSendMagicEffect(hitpos,effect) end end end end PLAYERS[isInArray(PLAYERS, info.player)] = 0 mayNotLogout(info.player, 0) return 1 end function planting(info) if info.num == PLANTING_DELAY then doPlayerSendTextMessage(info.player,22,"Plastic Bomb successfully planted!") mayNotMove(info.player,0) addEvent(explosion,EXPLOSION_DELAY,info) else info.num = info.num + 1 doPlayerSendTextMessage(info.player,22,info.num.."...") addEvent(planting,1000,info) end return 1 end function onUse(cid, item, frompos, item2, topos) position = getThingPos(item.uid) if (getTilePzInfo(position) == 0) then if (isInArray(PLAYERS, cid) == 0) then table.insert(PLAYERS, cid) doSendMagicEffect(frompos,3) info = {player = cid, pos = position, num = 1} doPlayerSendTextMessage(cid,22,"Planting the bomb...") doPlayerSendTextMessage(cid,22,"1...") mayNotMove(cid,1) mayNotLogout(cid, 1) doRemoveItem(item.uid,1) addEvent(planting,1000,info) else doPlayerSendCancel(cid,"You can only plant one bomb at the same time.") end else doPlayerSendCancel(cid,"You can not plant this bomb in a PZ!") end return 1 end
Krok drugi W actions.xml dodajemy linijkę:
<action itemid="4852" script="bomb.lua" />
Niektórym z was może się to przydać.
Pozdrawiam mołego korzystania.
Offline
Dodam ze dmg obrazen mozna zmieniac w linijce
local MAX_HIT = 500
local MIN_HIT = 100
Czas do wzbuchu
local EXPLOSION_DELAY = 5000 --milliseconds
Czas stawiania bomby
local PLANTING_DELAY = 5 --seconds
Offline
przyda sie thx
Offline
Spoko skrypt Leci Repucik
Offline
super skrypt przyda sie thx
Offline
Heh, niezłe ;]
9/10, bo trochę nie bardzo dobrana grafika ^.^
Offline
niestety nie dziala na evo 8.1, pisze
20:46 Planting the bomb...
20:46 1...
I to tyle ;/ h3lp
Offline
Nie Działa
@up2 Dokładnie To Samo Mi Pisze
Ostatnio edytowany przez GoD Hero (2008-06-10 20:52:06)
Offline
YYY..prosze was. juz taki temat jets i skrypt przeze mnie..i jeszcze dajecie mu reputy -.-
Jesli zapomnieliscie prosze o to link:
http://tibia11.pun.pl/viewtopic.php?id=4449
-.- "-"
Offline
Co trzeba powiedzieć żeby podłożył tą bombę?
Pozdrawiam.
Offline
Powiem 1. Dlaczego nie wybucha? Mi robi tylko takie coś jakbyśmy nie trafiali w potwora (żółte). Daj ss albo filmik
Offline
Zbanowany
Temat byl
Bomba nie dziala na silnikach Evolutions 8.1 XML jak cos ludzie zawsze jest na evo jest takie cos ze niby odlicza ci na zielono czas a na koniec nic to samo jest na Aries 0.4.5 i 0.4.0 XML
Offline