//===== eAthena Script =======================================
//= War of Emperium Treasure Rooms for Payon Guild Castles
//===== By: ==================================================
//= jAthena - kalen (1.0)
//= 1.1 by Akaru, ho|yAnge|X, and Valaris
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
//=
//===== Additional Comments: =================================
//= v1.2 Optimized with functions.[kobra_k88]
//============================================================
//<================================ Castle 1 ================================>\\
// Treasure Spawn ----------------------------------------------------------
payg_cas01,1,1,0 script Treasure_Py01 -1,{
OnRecvCastlePy01:
end;
OnInit:
if($boxNumPy01 == 0) end;
set $@bxPy01, $boxNumPy01;
callfunc "F_GldTreas","payg_cas01","Py01",$boxNumPy01,$@bxPy01,$@boxIdPy01,1344,286,4,295,13,1;
end;
OnDied:
mapannounce "payg_cas01","Treasure Chest Broken Open",17;
set $boxNumPy01, $boxNumPy01 -1;
if($boxNumPy01 == 0) mapannounce "payg_cas01", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
end;
}
// Treasure Room Switch ---------------------------------------------------
payg_cas01,295,8,0 script Switch#TresPy01 111,{
callfunc "F_GldTreasSw", "payg_cas01",120,59;
end;
}
//<================================ Castle 2 ================================>\\
// Treasure Spawn ----------------------------------------------------------
payg_cas02,1,1,0 script Treasure_Py02 -1,{
OnRecvCastlePy02:
end;
OnInit:
if($boxNumPy02 == 0) end;
set $@bxPy02, $boxNumPy02;
callfunc "F_GldTreas","payg_cas02","Py02",$boxNumPy02,$@bxPy02,$@boxIdPy02,1346,140,140,148,149,1;
end;
OnDied:
mapannounce "payg_cas02","Treasure Chest Broken Open",17;
set $boxNumPy02, $boxNumPy02 -1;
if($boxNumPy02 == 0) mapannounce "payg_cas02", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
end;
}
// Treasure Room Switch ----------------------------------------------------
payg_cas02,149,148,0 script Switch#TresPy02 111,{
callfunc "F_GldTreasSw", "payg_cas02",22,261;
end;
}
//<================================ Castle 3 ================================>\\
// Treasure Spawn ----------------------------------------------------------
payg_cas03,158,168,0 script Treasure_Py03 -1,{
OnRecvCastlePy03:
end;
OnInit:
if($boxNumPy03 == 0) end;
set $@bxPy03, $boxNumPy03;
callfunc "F_GldTreas","payg_cas03","Py03",$boxNumPy03,$@bxPy03,$@boxIdPy03,1348,154,164,162,173,1;
end;
OnDied:
mapannounce "payg_cas03","Treasure Chest Broken Open",17;
set $boxNumPy03, $boxNumPy03 -1;
if($boxNumPy03 == 0) mapannounce "payg_cas03", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
end;
}
// Treasure Room Switch ----------------------------------------------------
payg_cas03,163,167,0 script Switch#TresPy03 111,{
callfunc "F_GldTreasSw", "payg_cas03",11,278;
end;
}
//<================================ Castle 4 ================================>\\
// Treasure Spawn ----------------------------------------------------------
payg_cas04,146,48,0 script Treasure_Py04 -1,{
OnRecvCastlePy04:
end;
OnInit:
if($boxNumPy04 == 0) end;
set $@bxPy04, $boxNumPy04;
callfunc "F_GldTreas","payg_cas04","Py04",$boxNumPy04,$@bxPy04,$@boxIdPy04,1350,142,44,151,51,1;
end;
OnDied:
mapannounce "payg_cas04","Treasure Chest Broken Open",17;
set $boxNumPy04, $boxNumPy04 -1;
if($boxNumPy04 == 0) mapannounce "payg_cas04", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
end;
}
// Treasure Room Switch ----------------------------------------------------
payg_cas04,151,47,0 script Switch#TresPy04 111,{
callfunc "F_GldTreasSw", "payg_cas04",38,285;
end;
}
//<================================ Castle 5 ================================>\\
// Treasure Spawn ----------------------------------------------------------
payg_cas05,156,131,0 script Treasure_Py05 -1,{
OnRecvCastlePy05:
end;
OnInit:
if($boxNumPy05 == 0) end;
set $@bxPy05, $boxNumPy05;
callfunc "F_GldTreas","payg_cas05","Py05",$boxNumPy05,$@bxPy05,$@boxIdPy05,1352,152,128,160,135,1;
end;
OnDied:
mapannounce "payg_cas05","Treasure Chest Broken Open",17;
set $boxNumPy05, $boxNumPy05 -1;
if($boxNumPy05 == 0) mapannounce "payg_cas05", "All of the treasure boxes have been opened. You must wait untill the next day for them to appear again.",0;
end;
}
// Treasure Room Switch ----------------------------------------------------
payg_cas05,161,136,0 script Switch#TresPy05 111,{
callfunc "F_GldTreasSw", "payg_cas05",277,250;
end;
}