after some time, the runes will not appear? there's no error in mapserv here's the script
- script Runes -1,{
set .@dif, strnpcinfo(2);
if ( .remind[.@dif] == 0 ) {
set .remind[.@dif], 1;
initnpctimer;
}
dispbottom "Walkthrough to get Runes.";
end;
OnTouch:
switch( .Runes ){
Case 1: // Double Damage
sc_start SC_INCATKRATE,( .Duration * 1000 ),100;
sc_start SC_INCMATKRATE,( .Duration * 1000 ),100;
break;
Case 2: // Invisibilty
initnpctimer "Runes",1;
skill "AS_CLOAKING",10,1;
sc_start SC_CLOAKING,( .Duration * 1000 ),10;
stopnpctimer "Runes",1;
break;
Case 3: // Ressurection
sc_start SC_KAIZEL,( .Duration * 1000 ),7;
break;
Case 4: // Illusion
getmapxy( .@Map$,.@X,.@Y,0,strcharinfo(0) );
clone .@Map$,.@X,.@Y,"",getcharid(0),getcharid(0),"",1,.Duration;
clone .@Map$,.@X,.@Y,"",getcharid(0),getcharid(0),"",1,.Duration;
break;
Case 5: // Haste
sc_start SC_SpeedUp1,( .Duration * 1000 ),0;
break;
Case 6: // Increase Flee
sc_start SC_INCFLEE,( .Duration * 1000 ),300;
break;
Case 7: // Double HP
sc_start SC_INCMHPRATE,( .Duration * 1000 ),100;
break;
//Add New Runes Here...
}
announce "[ "+strcharinfo(0)+" ] has gained "+.Names$[.Runes]+".",bc_map,0x00FF00;
dispbottom "You have gained "+.Names$[.Runes]+" for 1 minute!";
disablenpc strnpcinfo(0);
set .Runes,0;
initnpctimer;
set .timeout, 2; // Set this for the cooldown of Runes in minutes...
if ( .timeout == 0 ) set .timeout, 2; // Set this for the cooldown of Runes...
set .@dif, strnpcinfo(2);
set .remind[.@dif], 0;
set .starttime[.@dif], gettimetick(2);
do {
set .remaintime[.@dif], .timeout * 60 + .starttime[.@dif] - gettimetick(2);
set .@hour[.@dif], .remainTime[.@dif] / 3600 ;
set .@min[.@dif], .remainTime[.@dif] % 3600 / 60 ;
set .@sec[.@dif], .remainTime[.@dif] % 3600 % 60 ;
delwaitingroom strnpcinfo(0);
waitingroom "Cooldown "+( ( .@hour[.@dif] )?( .@hour[.@dif] +":"):"" )+( ( .@min[.@dif] < 10 )?"0"+ .@min[.@dif]: .@min[.@dif] )+":"+( ( .@sec[.@dif] < 10 )?"0"+ .@sec[.@dif]: .@sec[.@dif] ), 0;
set .Runes,rand(1,( getarraysize( .Names$ ) - 1 ));
sleep 1000;
} while ( .remaintime[.@dif] > 1 );
set .remaintime[.@dif], 0;
delwaitingroom strnpcinfo(0);
end;
OnInit:
OnTimer120000: //Change this if you changed the cooldown for Runes...
setarray .Names$[1],
"Double Damage",
"Invisibility",
"Ressurection",
"Illusion",
"Haste",
"Increase Flee",
"Double HP";
//Add the Name of the Rune Here..
// Random Coordinate where NPC will Shown Again
setarray .CoordinateX[0],150,161;
setarray .CoordinateY[0],171,171;
// Status to be ended....
sc_end SC_CLOAKING;
set .Random,rand( getarraysize( .CoordinateX ) );
movenpc strnpcinfo(0),.CoordinateX[ .Random ],.CoordinateY[ .Random ];
// NPC will show again...
enablenpc strnpcinfo(0);
// Settings
set .Duration,60; //Change the Duration of Runes here...
set .Runes,rand( 1,( getarraysize( .Names$ ) - 1 ));
stopnpctimer;
}
//Duplicates here....
prontera,83,158,4, duplicate(Runes) Runes#1 802,2,2
Here is the screen shot, there's no countdown timer, the other respawn point is beside the sinx.
I tryied the Post #24 and I didn't change anything, it works first but same as my problem.It did not re-spawn again. All I did is get the runes and stay beside it until it cools down then it stops working.bug.