 |
|
 |
|
Xarin
Nowy
Dołączył: 07 Lis 2006
Posty: 19
Przeczytał: 0 tematów
Ostrzeżeń: 0/10 Skąd: Poland
|
|
 |
|
 |
|
Wysłany: Śro 16:47, 08 Lis 2006 Temat postu: 3 Inwazje calkowicie by mee :) |
|
|
Wiem ze dawanie takich latwych do zrobienia skyptow jak inwazja to troche dziwne ale chce go dac innym a szczegolnie tym ktorzy nie umieja ich zrobic ^^
Skrypty w calosci by mee na 7.6
A wiec tak 1 skrypt to robimy tak, wchodzimy w data/actions/scripts i tam robimy plik o nazwie invasion.lua albo jak ktos chce -.- a w nim dajemy to:
Kod:
--Invasion script
-- By Scorpioon
--Variables that need to be set according to your map/desire:
--topleft=the top left cordinate of the invasion area
--bottonright= the botton right cordinate of the invasion area
--maxmonsters= the maximum number of monsters that will appear. Set it "nil" for no monster limit.
--spawnrate= the chance of a monster appearing in a square of the invasion area
--species= the odds that determine what kind of monster will be summoned
-- DO NOT CHANGE THE FOLLOWING VARIABLES: checking, summonedtotal, checkforsummon.
function onUse(cid, item, frompos, item2, topos)
if getPlayerAccess(cid) ~=0 then
topleft={x=132, y=37, z=7}
bottonright={x=163, y=41, z=7}
maxmonsters= nil
checking={x=topleft.x, y=topleft.y, z=topleft.z} --Do Not Change
summonedtotal=0 --Do Not Change
repeat
checkforsummon=0 --Do Not Change
spawnrate=math.random(0,10)
if spawnrate==0 and summonedtotal ~= maxmonsters then
species=math.random(1,10)
if species == 1 then
checkforsummon = doSummonCreature("murius",checking)
elseif species == 2 then
checkforsummon = doSummonCreature("minotaur guard",checking)
elseif species == 3 then
checkforsummon = doSummonCreature("minotaur",checking)
elseif species == 4 then
checkforsummon = doSummonCreature("minotaur mage",checking)
elseif species == 5 then
checkforsummon = doSummonCreature("minotaur archer",checking)
elseif species == 6 then
checkforsummon = doSummonCreature("minotaur guard",checking)
elseif species == 7 then
checkforsummon = doSummonCreature("murius",checking)
else
checkforsummon = doSummonCreature("minotaur mage",checking)
end
-- if species<5 and species >=0 then
-- checkforsummon=doSummonCreature("miontaur mage",checking)
-- elseif species == 5 then
-- checkforsummon=doSummonCreature("murius",checking)
-- end
if checkforsummon~= 0 then
summonedtotal=summonedtotal+1
end
end
checking.x=checking.x+1
if checking.x>bottonright.x then
checking.x=topleft.x
checking.y=checking.y+1
end
until checking.y > bottonright.y
--doPlayerSay(cid,"/B Minotaury zaatakowaly miasto",23)
print("Number of creatures summoned:",summonedtotal)
end
return 1
end
Teraz wchodzimy w data/actions/actions.xml i tam dodajemy linijke:
Kod:
<action itemid="2322" script="invasion.lua" />
W tym przypadku to jest zrobiona inwazja na minosy tylko na ulicy Great Street i zeby ja zrobic wystarczy nacisnac gmem na ten przyrzad, akurat teraz to jest doll (lalka) i skrypt dziala
Teraz 2 skrypt, wchodzimy w data/actions/scripts i tam tworzymy plik o nazwie inwazja.lua albo jak ktos chce to inna ^^ a w nim wppisujemy to:
Kod:
--Invasion script
-- By Scorpioon
--Variables that need to be set according to your map/desire:
--topleft=the top left cordinate of the invasion area
--bottonright= the botton right cordinate of the invasion area
--maxmonsters= the maximum number of monsters that will appear. Set it "nil" for no monster limit.
--spawnrate= the chance of a monster appearing in a square of the invasion area
--species= the odds that determine what kind of monster will be summoned
-- DO NOT CHANGE THE FOLLOWING VARIABLES: checking, summonedtotal, checkforsummon.
function onUse(cid, item, frompos, item2, topos)
if getPlayerAccess(cid) ~=0 then
topleft={x=138, y=41, z=7}
bottonright={x=184, y=65, z=7}
maxmonsters= nil
checking={x=topleft.x, y=topleft.y, z=topleft.z} --Do Not Change
summonedtotal=0 --Do Not Change
repeat
checkforsummon=0 --Do Not Change
spawnrate=math.random(0,10)
if spawnrate==0 and summonedtotal ~= maxmonsters then
species=math.random(1,10)
if species == 1 then
checkforsummon = doSummonCreature("dragon lord",checking)
elseif species == 2 then
checkforsummon = doSummonCreature("dragon",checking)
elseif species == 3 then
checkforsummon = doSummonCreature("dragon",checking)
elseif species == 4 then
checkforsummon = doSummonCreature("dragon lord",checking)
elseif species == 5 then
checkforsummon = doSummonCreature("dragon",checking)
elseif species == 6 then
checkforsummon = doSummonCreature("demodras",checking)
elseif species == 7 then
checkforsummon = doSummonCreature("dragon",checking)
elseif species == 8 then
checkforsummon = doSummonCreature("dragon lord",checking)
elseif species == 9 then
checkforsummon = doSummonCreature("demodras",checking)
else
checkforsummon = doSummonCreature("demodras",checking)
end
-- if species<5 and species >=0 then
-- checkforsummon=doSummonCreature("demodras",checking)
-- elseif species == 5 then
-- checkforsummon=doSummonCreature("dragon lord",checking)
-- end
if checkforsummon~= 0 then
summonedtotal=summonedtotal+1
end
end
checking.x=checking.x+1
if checking.x>bottonright.x then
checking.x=topleft.x
checking.y=checking.y+1
end
until checking.y > bottonright.y
--doPlayerSay(cid,"/B Dragony zaatakowaly miasto",23)
print("Number of creatures summoned:",summonedtotal)
end
return 1
end
I teraz wchodzimy w data/actions/actions.xml i tam dodajemy linijke:
Kod:
<action itemid="5080" script="inwazja.lua" />
I w tym przupadku to jest inwazja na dragonow na cale miasto (niektore stworki sa w chatkach ) i przyrzad do inwazji to pluszak panda.
3 Skrypt :wchodzimy w data/actions/scripts i tam robimy plik o nazwie inwazjaa.lua albo jak ktos chce to incazej -.-" i tam wpisujemy to
Kod:
--Invasion script
-- By Scorpioon
--Variables that need to be set according to your map/desire:
--topleft=the top left cordinate of the invasion area
--bottonright= the botton right cordinate of the invasion area
--maxmonsters= the maximum number of monsters that will appear. Set it "nil" for no monster limit.
--spawnrate= the chance of a monster appearing in a square of the invasion area
--species= the odds that determine what kind of monster will be summoned
-- DO NOT CHANGE THE FOLLOWING VARIABLES: checking, summonedtotal, checkforsummon.
function onUse(cid, item, frompos, item2, topos)
if getPlayerAccess(cid) ~=0 then
topleft={x=137, y=42, z=7}
bottonright={x=137, y=60, z=7}
maxmonsters= nil
checking={x=topleft.x, y=topleft.y, z=topleft.z} --Do Not Change
summonedtotal=0 --Do Not Change
repeat
checkforsummon=0 --Do Not Change
spawnrate=math.random(0,10)
if spawnrate==0 and summonedtotal ~= maxmonsters then
species=math.random(1,10)
if species == 1 then
checkforsummon = doSummonCreature("orc berserker",checking)
elseif species == 2 then
checkforsummon = doSummonCreature("orc leader",checking)
elseif species == 3 then
checkforsummon = doSummonCreature("orc rider",checking)
elseif species == 4 then
checkforsummon = doSummonCreature("orc shaman",checking)
elseif species == 5 then
checkforsummon = doSummonCreature("orc spearman",checking)
elseif species == 6 then
checkforsummon = doSummonCreature("orc warlord",checking)
elseif species == 7 then
checkforsummon = doSummonCreature("orc warrior",checking)
else
checkforsummon = doSummonCreature("orc",checking)
end
-- if species<5 and species >=0 then
-- checkforsummon=doSummonCreature("orc",checking)
-- elseif species == 5 then
-- checkforsummon=doSummonCreature("orc warlord",checking)
-- end
if checkforsummon~= 0 then
summonedtotal=summonedtotal+1
end
end
checking.x=checking.x+1
if checking.x>bottonright.x then
checking.x=topleft.x
checking.y=checking.y+1
end
until checking.y > bottonright.y
--doPlayerSay(cid,"/B Orc's have been spotted near the city!",23)
print("Number of creatures summoned:",summonedtotal)
end
return 1
end
I teraz wlazimy w data/actions/actions.xml i tam dodajemy linijke :
Kod:
<action itemid="2326" script="inwazjaa.lua" />
W tym przypadku to jest inwazja orcow od great street do dp i zeby ja zrobic trzeba nacisnac na przyrzad (akurat ja zrobilem ze to jest anihilation teddy bear) jak ktos chce moze sobie zmienic inwazje na np dwarfy albo item do robienia inwazji.Pozycje inwazji zmienia sie w
Kod:
topleft={x=132, y=37, z=7}
bottonright={x=163, y=41, z=7}
topleft to jest od kad a bottonright to jest do kad.Ja tu w moich skryptach podalem pozycje dzialajaca na Yurotsa .Ostatnia rzecz jaka chce powiedziec to jest dla tych ktorzy chca cos takiego zrobic a nie umieja.
Jesli chcecie zrobic zeby inwazje mogli robic tez np zwykli playerzy albo tutorzy i consulerzy to znajdujecie taka linijke:
Kod:
if getPlayerAccess(cid) ~=0 then
W tym codzie jest ustawiony ze robic inwazje moga robic tlyko gmowie/counsulerzy i tutorzy
Wiec tu podaje :
Jak ktos chce zeby robic inwazje mogli tylko gmowie 0 zamienia na 2
Jak ktos chce zeby robic inwazje mogli gmowie i counsulerzy 0 zamienia na 1
Jak ktos chce zeby robic inwazje mogli : gmowie/counsulerzy i tutorzy zostawia to 0
Jak ktos chce zeby inwazje mogli robic : gmowie/counsulerzy/tutorzy oraz zwykli playerzy 0 zamienia na -1
Mam nadzieje ze sie moze chociaz troche przyda
Post został pochwalony 0 razy
|
|