And now with Prime Hours teleports will be completed
Code:
class teleporter : announce_raid_boss_position
{
parameter:
string ShopName = "";
string fnHi = "thi.htm";
string fnYouAreChaotic = "tcm.htm";
string fnNobless = "";
string fnNoNobless = "";
string fnNoNoblessItem = "";
int PrimeHours = 1;
int PHfromHour = 20;
int PHtoHour = 22;
int PHfromDay = 1;
int PHtoDay = 7;
property:
TelPosList Position = {{"Talking Island Village"; -84169; 244693; -3729; 100000; 0 }};
TelPosList PositionPH = {{"Talking Island Village"; -84169; 244693; -3729; 100000; 0 }};
TelPosList PositionNoblessNeedItemTown = {{"Talking Island Village"; -84169; 244693; -3729; 100000; 0 }};
TelPosList PositionNoblessNoItemTown = {{"Talking Island Village"; -84169; 244693; -3729; 100000; 0 }};
TelPosList PositionNoblessNeedItemField = {{"Talking Island Village"; -84169; 244693; -3729; 100000; 0 }};
TelPosList PositionNoblessNoItemField = {{"Talking Island Village"; -84169; 244693; -3729; 100000; 0 }};
TelPosList PositionNoblessNeedItemSSQ = {{"Talking Island Village"; -84169; 244693; -3729; 100000; 0 }};
TelPosList PositionNoblessNoItemSSQ = {{"Talking Island Village"; -84169; 244693; -3729; 100000; 0 }};
handler:
EventHandler TELEPORT_REQUESTED(i0,i1,talker)
{
if( PrimeHours )
{
i0 = gg->GetDateTime(0,3);
i1 = gg->GetDateTime(0,6);
if( ( i0 >= PHfromHour ) && ( i0 <= PHtoHour ) && ( i1 >= PHfromDay ) && ( i1 <= PHtoDay ) )
{
myself->Teleport(talker,PositionPH,ShopName,"","","",57,myself->MakeFString(1000308,"","","","",""));
return;
}
}
myself->Teleport(talker,Position,ShopName,"","","",57,myself->MakeFString(1000308,"","","","",""));
}
}
A little thx to Sauron because he show me how he do this and i based my code in his.
As always, you want the compiled version? Do it by your own or send me a PM if you're not a leecher.