What's new

Prze?yj X Fal

Status
Not open for further replies.

Arkam

Forum friend
Joined
Dec 20, 2008
Messages
1,980
Reaction score
180
Nikt nic tutaj nie wrzuca wi?c postanowi?em, ?e czasem co? udost?pni?, jako ?e nie mam w zwyczaju rozdawania full skrypt?w za free do nb ots?w kt?re potem maj? w opisie 'unikatowe systemy' to b?d? wrzuca? tylko cz??ci danych skrypt?w, kt?re wymagaj? przynajmniej podstawowej wiedzy nt. lua ;)

Opis: Jest to zarys skryptu, kt?ry respi fale monsterk?w [tak jak na demon oak +-] od danej poz w prawo, ofc mo?na sobie tam pozmienia?, mo?e akurat komu? przyda si? do cz??ci jakiego? questa albo sam concept ;D


[lua]function onUse(cid, item, fromPosition, itemEx, toPosition)
local center = {x=2162,y=2249,z=10} --Centrum pozycji od jakiej beda sie {respily moby [w prawo]}
local effectCenterPos;
local debugMode = false;
local allStages = 8; --WAZNE! LICZBA WSZYSTKICH LEVELI \/ Z TEGO PONIZEJ ;)

local stages = {

[-1] = {
monsters = {"Cave Rat","Cave Rat","Minotaur","Rotworm","Rotworm"},
underStages = 1; -- na pierwszym jest 2 wiecej czyli realnie underStages + 2
--Under Stages czyli liczba fal mobow podanych w danej rundzie
},

[0] = {
monsters = {"Cave Rat","Cave Rat","Minotaur","Rotworm","Rotworm"},
underStages = 3;
},

[1] = {
monsters = {"Cave Rat","Cave Rat","Minotaur","Rotworm","Rotworm"},
underStages = 5;
},

[2] = {
monsters = {"Cave Rat","Cave Rat","Minotaur","Rotworm","Rotworm"},
underStages = 3;
},

[3] = {
monsters = {"Cave Rat","Cave Rat","Minotaur","Rotworm","Rotworm"},
underStages = 2;
},

[4] = {
monsters = {"Dragon","Cave Rat","Dragon Lord","Rotworm","Rotworm"},
underStages = 4;
},

[5] = {
monsters = {"Cave Rat","Cave Rat","Minotaur","Rotworm","Rotworm"},
underStages = 5;
},

[6] = {
monsters = {"Cave Rat","Cave Rat","Demon","Rotworm","Demon"},
underStages = 4;
}

}




local endStorage = 46183; --Storage okreslajace ukonczenie questa i mozliwosc odebrania nagrod - 2 // 1 - mozna zaczac questa tj wybijac to

local underStageStorage = 46181;
local monsterStorage = 46182;
local playerStorage = getPlayerStorageValue(cid,monsterStorage)
local playerUnderStorage = getPlayerStorageValue(cid,underStageStorage)

local function currentMonsters(cid)
for i = 1, #stages[playerStorage].monsters do
monster = doCreateMonster(stages[playerStorage].monsters,center)
effectCenterPos = getCreaturePos(monster)
effectCenterPos = {x = effectCenterPos.x +1,y = effectCenterPos.y+1,z = effectCenterPos.z}; ---to sobie mozna usunac, mi to jest potrzebne bo mam przesuniety efekt w spr
doSendMagicEffect(effectCenterPos, 290)
doSendAnimatedText(center, 'SPAWNED', 70)
center.x = center.x +1;
end
return true
end

local function UpdateStage(cid)
setPlayerStorageValue(cid,underStageStorage,playerUnderStorage + 1)
if(playerUnderStorage == stages[playerStorage].underStages) then
setPlayerStorageValue(cid,monsterStorage,playerStorage + 1)
setPlayerStorageValue(cid,underStageStorage,0)
end
return true
end

local function resetStorages(cid)
setPlayerStorageValue(cid,underStageStorage,-1)
setPlayerStorageValue(cid,monsterStorage,-1)
setPlayerStorageValue(cid,endStorage,-1);
end

local function MessageStage()
local function stage()
local stage = playerUnderStorage
if(stage < 1) then
stage = 0;
end
return stage;
end
doSendAnimatedText(getPlayerPosition(cid), 'Stage '..stage()..'', 70)
end



if(debugMode) then
resetStorages(cid)
print("Debug zakonczony");
return false;
end

if(getPlayerStorageValue(cid,endStorage) == -1) then
return false;
end


if(playerStorage+1 >= allStages) then
if(getPlayerStorageValue(cid,endStorage) ~= 2 and getPlayerStorageValue(cid,endStorage) ~= 3) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Stage Completed")
setPlayerStorageValue(cid,endStorage,2);
end
return false
end

currentMonsters(cid)
UpdateStage(cid)
MessageStage()


return true
end
[/lua]
 

dami1310

Poskramiacz Internet?w
Joined
Jun 1, 2009
Messages
1,385
Reaction score
113
Odp: Prze?yj X Fal

Dobry skrypt, mo?e si? przyda? ;)
 

grabasz

User
Joined
Jan 24, 2012
Messages
12
Reaction score
0
Odp: Prze?yj X Fal

Wielce Dzi?ki mi si? na pewno przyda do ots.

Pozdrawiam Mariusz
 
Status
Not open for further replies.
Top