Jelly 0 Report post Posted June 1, 2016 Hi, is there any way to program a maze to only spawn a monster at a location when another monster has been killed? preferably with a map notice, like The minibosses have been killed! The big boss has spawned! and then it spawns the boss. Quote Share this post Link to post Share on other sites
Onioni 58 Report post Posted June 1, 2016 (edited) you can check how abb 5+ is done, there is ready scripts for that and here is small example to what u need for it.. function map_copy_run_hell( map_copy ) if CheckMonsterDead ( AZRAEL[5] ) == 1 then if CRY[5]==0 then local Notice_all = "Saro: I'll revive and you all will fall into depths more deeper than despair!!!" MapCopyNotice ( map_copy , Notice_all ) CRY[5]=1 end end if CheckMonsterDead ( AZRAEL[6] ) == 1 then if CRY[6]==0 then local Notice_all = "Karu: You might have passed this stage, but prepare for the worst!" MapCopyNotice ( map_copy , Notice_all ) CRY[6]=1 end end if CheckMonsterDead ( AZRAEL[7] ) == 1 then if CRY[7]==0 then local Notice_all = "Aruthur: Please forgive me, my lord, I don't want to go back to hell, Ah!!!" MapCopyNotice ( map_copy , Notice_all ) CRY[7]=1 end end if CheckMonsterDead ( AZRAEL[8] ) == 1 then if CRY[8]==0 then local Notice_all = "Sacrois: Foolish humans, We will meet again! Ha-ha! Ha-ha!" MapCopyNotice ( map_copy , Notice_all ) CRY[8]=1 end end if CRY[5]==1 and CRY[6]==1 and CRY[7]==1 and CRY[8]==1 and HellNotice[1]==0 then local x = 100 local y = 100 local x1 = x * 100 local y1 = y * 100 local refresh = 6000000 local Life = 59000000 local Mob_ID = 75 BigBoss = CreateCha( Mob_ID , x1 , y1 , 145, refresh) SetChaLifeTime(BigBoss,Life) Notice ( "<Mysterious Voice>: Abaddon 5 - 8 all 4 boss is defeated and Boss is summoned at ("..x..","..y..")") HellNotice[1] = 1 end end function map_copy_close_hell ( map_copy ) HellNotice[1] = 0 CRY[5]=0 CRY[6]=0 CRY[7]=0 CRY[8]=0 end ---variable.lua lines need to be as them are in hell CRY = {} CRY[5]=0 CRY[6]=0 CRY[7]=0 CRY[8]=0 HellNotice = {} HellNotice[1] = 0 --monster_conf.lua AZRAEL[5] = CreateCha(974, 7200, 6200, 145, 21600) AZRAEL[6] = CreateCha(975, 19100, 6200, 145, 21600) AZRAEL[7] = CreateCha(976, 19000, 17900, 145, 21600) AZRAEL[8] = CreateCha(977, 7200, 17900, 145, 21600) Edited June 1, 2016 by Onioni Quote Download: Nightmare Demonic Helm Dimension Pirates Online files: get now New map Project: Flag PK Black Skin 3.1.3 for pko 1: Get now Share this post Link to post Share on other sites
DangThao 80 Report post Posted June 1, 2016 (edited) There is another way to trigger the monster, make it check, if the monster is dead, it will automatic spawn a monster into the assigned coordinate or random coordinates. Exp_and_level.lua: Function GetExp_New(dead, atk) local map_copy = GetChaMapCopy(atk) local monster_id = GetChaID(dead) if monster_id = 679 then BossRewards(atk) BossNotice(atk) CreateCha(678,7820,6225,90,10800) MapCopyNotice(map_copy, "You have defeated Wandering Soul and it summons Snowman Warlord at 78,62.") end end --End of GetExp_New(dead, atk) Function BossRewards(atk) GiveItem(role, 0, 3457, 1, 4) GiveItem(role, 0, 885, 1, 4) Notice("Player "..GetChaDefaultName(role).." kill Wandering Soul and obtain 1x Kal Runestone & 1x Refining Gem") local rand = Percentage_Random(0.25) if rand = 1 then AddMoney ( role , 0 , 50000 ) Notice("Player "..GetChaDefaultName(role).." have a great luck and gain 50000G.") end local random_item=math.random ( 1, 5 ) if random_item==1 then GiveItem ( role , 0 , 5845 , 1 , 4 ) elseif random_item==2 then GiveItem ( role , 0 , 5846 , 1 , 4 ) elseif random_item==3 then GiveItem ( role , 0 , 5847 , 1 , 4 ) elseif random_item==4 then GiveItem ( role , 0 , 5848 , 1 , 4 ) elseif random_item==5 then GiveItem ( role , 0 , 5849 , 1 , 4 ) else GiveItem ( role , 0 , 885 , 1 , 4 ) end end --End of BossRewards(atk) Function BossNotice(atk) local Hour = os.date("%H") local Minute = os.date("%M") local Second = os.date("%S") if HasGuild(atk) == 0 then local cha_name = GetChaDefaultName(atk) Notice("Player "..cha_name" defeated Snowman Walord ["..Hour..":"..Minute..":"..Second.."]") end end --End of BossNotice(atk) Enjoy =D, u can add/edit/delete anything u want. Edited June 1, 2016 by Foxseiz Added a code tag on code 1 Quote Share this post Link to post Share on other sites
DangThao 80 Report post Posted June 2, 2016 @Foxseiz what was edited? Quote Share this post Link to post Share on other sites
Foxseiz 138 Report post Posted June 2, 2016 Just added a code tag on the code. Quote Share this post Link to post Share on other sites
pepet 0 Report post Posted November 20, 2018 Hello: Someone, can help me??? I need to change the opening hour of Abanddone 5 (hell). Or I need the function where I can change the hour. My idea for Abandone 5 will be open every day, every 3 hours... Thanks in advance :) Quote Share this post Link to post Share on other sites
Onioni 58 Report post Posted November 21, 2018 7 hours ago, pepet said: Hello: Someone, can help me??? I need to change the opening hour of Abanddone 5 (hell). Or I need the function where I can change the hour. My idea for Abandone 5 will be open every day, every 3 hours... Thanks in advance :) function init_entry(map) SetMapEntryMapName(map, "jialebi") SetMapEntryTime(map, "2016/1/1/20/0", "1/0/0", "0/1/0", "0/3/0") end function can_open_entry_hell( map ) local Now_Week = GetNowWeek() if Now_Week == 1 or Now_Week == 3 or Now_Week == 5 or Now_Week == 6 then --or Now_Week == 2 ti --or Now_Week == 4 to --or Now_Week == 7 su return 1 end Quote Download: Nightmare Demonic Helm Dimension Pirates Online files: get now New map Project: Flag PK Black Skin 3.1.3 for pko 1: Get now Share this post Link to post Share on other sites