Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script WorldBossController#wbmain -1,{
- function WorldBossSpawn;
- function WorldBossDeath;
- function WorldBossReset;
- end;
- OnClock0000:
- if(gettime(4) == 0)
- WorldBossReset;
- end;
- OnClock1000:
- OnClock1400:
- OnClock1800:
- WorldBossSpawn($@wkwb_mp,$wkwb_x,$wkwb_y,1,$wkwb_hp,$@wkwb_nm,$wkwb_id);
- end;
- OnClock1200:
- OnClock1600:
- OnClock2000:
- WorldBossDeath($@wkwb_mp,$@wkwb_nm);
- end;
- /*
- 0 = map name
- 1 = x coordinate
- 2 = y coordinate
- 3 = announce
- 4 = boss hp //default hp
- 5 = boss name
- 6 = boss id
- */
- function WorldBossSpawn {
- if(getarg(3))
- announce "[ World Boss ] "+getarg(5)+" has spawned at "+getarg(0),0;
- monster getarg(0),getarg(1),getarg(2),getarg(5),getarg(6),1,strnpcinfo(2)+"::OnMyWbDead";
- $wb_gid = $@mobid[0];
- getunitdata $wb_gid,.@wb_stats;
- if($wb_hp <= 0)
- $wb_hp = getarg(4);
- setunitdata $wb_gid,UMOB_MAXHP,$wb_hp;
- return;
- }
- /*
- 0 = map name
- 1 = boss name
- */
- function WorldBossDeath {
- getunitdata $wb_gid,@wb_stats;
- $wb_hp = .@wb_stats[UMOB_HP];
- killmonster getarg(0);
- if($wb_hp > 0)
- announce "[ World Boss ] "+getarg(1)+" has "+callfunc("F_InsertComma",$wb_hp)+" HP left.",0;
- else
- announce "[ World Boss ] "+getarg(1)+" has been killed!",0;
- end;
- }
- function WorldBossReset {
- $wb_gid = 0;
- $wb_hp = 0;
- $@wkwb_mp = "";
- $wkwb_x = 0;
- $wkwb_y = 0;
- $wkwb_hp = 0;
- $@wkwb_nm = "";
- $wkwb_id = 0;
- .@rand = rand(0,4);
- switch(.@rand){
- case 0:
- $@wkwb_mp = "prontera";
- $wkwb_x = 100;
- $wkwb_y = 100;
- $wkwb_hp = 15000;
- $@wkwb_nm = "Poring";
- $wkwb_id = 1002;
- break;
- case 1:
- $@wkwb_mp = "payon";
- $wkwb_x = 100;
- $wkwb_y = 100;
- $wkwb_hp = 15000;
- $@wkwb_nm = "Poring";
- $wkwb_id = 1002;
- break;
- case 2:
- $@wkwb_mp = "morroc";
- $wkwb_x = 100;
- $wkwb_y = 100;
- $wkwb_hp = 15000;
- $@wkwb_nm = "Poring";
- $wkwb_id = 1002;
- break;
- case 3:
- $@wkwb_mp = "izlude";
- $wkwb_x = 100;
- $wkwb_y = 100;
- $wkwb_hp = 15000;
- $@wkwb_nm = "Poring";
- $wkwb_id = 1002;
- break;
- case 4:
- $@wkwb_mp = "geffen";
- $wkwb_x = 100;
- $wkwb_y = 100;
- $wkwb_hp = 15000;
- $@wkwb_nm = "Poring";
- $wkwb_id = 1002;
- break;
- }
- announce "[ World Boss ] "+$@wkwb_nm+" has been chosen as this week's World Boss!",0;
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement