Try this one..
when using a Custom Headger (ItemID 25234 ) get 10 Siver Coin in 1 minute & 100 Silver Coin in 1 hour,
when not to use custom headger only get a silver coin every minute.
- script minutepoints -1,{
//--Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1 || checkchatting() == 1) {
dispbottom "The minute points event stopped because you were vending / chatting. Please relog if you wish to start again.";
stopnpctimer;
end;
}
//Check if Idle
getmapxy(
[email protected]$,
[email protected],
[email protected], 0 );
if(@map$ ==
[email protected]$ && @x ==
[email protected] && @y ==
[email protected]) {
set @afk, @afk + 1;
}
//If move timer resets
else {
set @afk, 0;
}
set @map$,
[email protected]$; set @x,
[email protected]; set @y,
[email protected];
//Idle Check for 5 Minutes
if(@afk == 5) {
dispbottom "The minute points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
stopnpctimer;
end;
}
end;
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
dispbottom "Total Minute's Played: " + @minute;
if( @minute == 1 ) // 10 Minutes
{
if(getequipid(EQI_HEAD_TOP)==25234)
{
// Received 10 Silver COin
set
[email protected]_amt, 10;
getitem 675,
[email protected]_amt;
dispbottom "You received "
[email protected]_amt+" Silver Coin by staying ingame for 1 minute";
}
else{
// Received only 1 Silver Coin when 25234 is not Equip.
set
[email protected]_amt, 1;
getitem 675,
[email protected]_amt;
dispbottom "You received "
[email protected]_amt+" Silver Coin by staying ingame for 1 minute";
}
}
if( @minute == 60 ) {
// 1 Hour
set @minute,0;
set @consecutive_hour, @consecutive_hour + 1;
if(getequipid(EQI_HEAD_TOP)==25234)
{
set
[email protected]_amt, 100;
getitem 675,
[email protected]_amt;
}
else{
//set
[email protected]_amt, 50;
//getitem 675,
[email protected]_amt;
}
}
// Check for 1 hours consecutive
// Received More Rewards
if(@consecutive_hour == 2)
{
// Set Rewards Here..
set @consecutive_hour, 0;
}
stopnpctimer;
initnpctimer;
end;
}
Make a Random Color.
12221,Megaphone_,Megaphone,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ setarray
[email protected]$[0], "0x51FF00", "0x0D00FF", "0x00FFD5", "0xDD00F", "0xFF8C00", "0xD5FF00", "0xFF00F7", "0xFFFFFF", "0x000000"; input @Megaphone$; announce strcharinfo (0) + ":" + @Megaphone$, bc_all, .
[email protected]$[rand(9)]; end; },{},{}