Jump to content
  • 0

Help me please


Yasunari Ishibashi

Question


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

prontera,155,181,5	script	Sample	757,{
set .charName$,strcharinfo(0);
mes "[Marco Hombreng]";
mes "Anda hanya memiliki 10 menit di dalam map.";
next;
menu "Gua Iblis[" + getmapusers("morocc") + " / 10]",mangkat;
mangkat:
announce "[Marco Hombreng]: "+strcharinfo(0)+" Masuk Gua Iblis",0;
warp.Map$,0,0;
initnpctimer;
end;


OnInit:
set .Map$,"morocc";
set .timeOut,60000;
end;

OnTimer1000:
if(getnpctimer(0)>=.timeOut)
goto TimesUp;
else
{
message .charName$,"You have "+((.timeOut-getnpctimer(0))/1000)+" Seconds.";
initnpctimer;
}
end;

TimesUp:
message .charName$,"Time's Up!! You will be warped out right now..";
mapannounce .Map$,"Time's Up !! You will be warped out right now..",0;
mapwarp .Map$,"prontera",155,181;
end;
}

please correct my script went wrong, the script timeout not working properly.

OnInit:
set .Map$,"morocc";
set .timeOut,60000;
end;

OnTimer1000:
if(getnpctimer(0)>=.timeOut)
goto TimesUp;
else
{
message .charName$,"You have "+((.timeOut-getnpctimer(0))/1000)+" Seconds.";
initnpctimer;
}
end;

thanks

Edited by Yasunari Ishibashi
Link to comment
Share on other sites

15 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  187
  • Reputation:   35
  • Joined:  01/01/12
  • Last Seen:  

what exactly is wrong ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   8
  • Joined:  01/06/12
  • Last Seen:  

Maybe this would help.

prontera,155,181,5 script Sample 757,{
set .charName$,strcharinfo(0);
mes "[Marco Hombreng]";
mes "Anda hanya memiliki 10 menit di dalam map.";
next;
menu "Gua Iblis[" + getmapusers("morocc") + " / 10]",mangkat;
mangkat:
announce "[Marco Hombreng]: "+strcharinfo(0)+" Masuk Gua Iblis",0;
warp.Map$,0,0;
sleep2 5000;
initnpctimer;
end;


OnInit:
set .Map$,"morocc";
set .timeOut,60000;
end;

OnTimer1000:
set .timeOut,.timeOut - 1000;
if(getnpctimer(0)>=.timeOut)
goto TimesUp;
else
{
message .charName$,"You have "+((.timeOut-getnpctimer(0))/1000)+" Seconds.";
initnpctimer;
}
end;

TimesUp:
message .charName$,"Time's Up!! You will be warped out right now..";
mapannounce .Map$,"Time's Up !! You will be warped out right now..",0;
mapwarp .Map$,"prontera",155,181;
stopnpctimer;
set .timeOut,60000;
end;
}

added .timeout deduction per second.

added stopnpctimer on TimesUp. - not sure if this is necessary.

added sleep2 5000 to give a 5second gap for map loading... decrease at will. I didn't check if the charid is to be retained so i added sleep2, if it isnt, use sleep instead.

Regards~

Edited by Smoke
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

what if the in map is created 10minutes & Can be calculated backwards?

Thanks for helping.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

why I was on the map morocc only 60 seconds?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

ops...something wrong in the OnTmeUp Label there..

replace the whole OnTimeUp label with this 1

OnTimeUp:
set @Time,@Time - 1;
if( !@Time ){
message strcharinfo(0),"Time's Up.";
sleep2 3000;
warp "prontera",155,181;
}else if( @Time < .Minute ){
message strcharinfo(0),"You have "+@Time+" Minutes Left.";
addtimer 60000,strnpcinfo(0)+"::OnTimeUp";
}
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

-    script    ZenyMenit    -1,{
function GetString;

//--Start of the Script
OnPCLoginEvent:
if(getgmlevel() > 10) goto Out;
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;

Out:
end;

OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1 || checkchatting() == 1) {
   dispbottom "Menit Zeny berhenti karena anda sedang vending / chatting. Silahkan relog untuk mengulang dari awal.";
   stopnpctimer;
   end;
}
//Check if Idle
getmapxy( .@map$, .@x, .@y, 0 );
if(@map$ == .@map$ && @x == .@x && @y == .@y) {
   set @afk, @afk + 1;
}
//If move timer resets
else {
   set @afk, 0;
}
   set @map$, .@map$; set @x, .@x; set @y, .@y;
//Idle Check for 55 Minutes
if(@afk == 55) {
   dispbottom "Menit Zeny berhenti karena kamu idle selama 55 menit. Silahkan relog untuk mengulang dari awal.";
   stopnpctimer;
   end;
}
end;

OnTimer60000:
set @minute, @minute + 1;
if(countitem(25574) == 1) || (countitem(25576) == 1) || (countitem(25578) == 1) || (countitem(25579) == 1) || (countitem(25584) == 1){
set .@point_amt, 1;
getitem 674,.@point_amt;
}else{
set .@bonus_amt, 1;
getitem 675,.@bonus_amt;
}
//Check for 1 Minute
dispbottom "Total Hour's Played: " + @consecutive_hour;
dispbottom "Total Minute's Played: " + @minute;
if(@minute == 60){
switch( rand(2) ){
   Case 0:
       atcommand "@option 2";
       set .@String$,GetString( 15,rand(5,10) );
       mes "[Antibot Check]";
       mes "Input the ^FF0000RED COLOUR^000000 part";
       mes "^0000FF"+GetString( 15,rand(5,10) )+"^FF0000"+.@String$+"^0000FF"+GetString( 15,rand(3,10) )+"^000000";
       input .@Input$;
       if( .@Input$ != .@String$ ){
           atcommand "@kick "+strcharinfo(0);
}else{
   set @minute,0;
   set .@cpoint_amt, 1;
   getitem 7606,.@cpoint_amt;
   set @consecutive_hour, @consecutive_hour + 1;
   atcommand "@option 0";
}
       break;

   Case 1:
       set .@A,rand(1000);
       set .@B,rand(1000);
       mes "If A = "+.@A+"   B = "+.@B;
       switch( rand(4) ){
           Case 0:
               set .@Answer,.@A + .@B;
               mes "How many is A + B ?";
               break;
           Case 1:
               set .@Answer,.@A - .@B;
               mes "How many is A - B ?";
               break;
           Case 2:
               set .@Answer,.@A * .@B;
               mes "How many is A * B ?";
               break;
           Case 3:
               set .@Answer,.@A / .@B;
               mes "How many is A / B ?";
               break;
       }
       input .@Input;
       if( .@Input != .@Answer ){
           mes "Wrong";
           atcommand "@kick "+strcharinfo(0);
}else{
   set @minute,0;
   set .@cpoint_amt, 1;
   getitem 7606,.@cpoint_amt;
   set @consecutive_hour, @consecutive_hour + 1;
   atcommand "@option 0";
}
       break;
   if(@consecutive_hour == 2) {
   set @consecutive_hour,0;
}
stopnpctimer;
initnpctimer;
end;

}


function    GetString    {
if( getarg(0) & 1 ) setarray .@List$[ getarraysize( .@List$ ) ],"1","2","3","4","5","6","7","8","9";
if( getarg(0) & 2 ) setarray .@List$[ getarraysize( .@List$ ) ],"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z";
if( getarg(0) & 4 ) setarray .@List$[ getarraysize( .@List$ ) ],"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z";
if( getarg(0) & 8 ) setarray .@List$[ getarraysize( .@List$ ) ],"!","@","#","$","%","^","&","*","(",")","-","=","/","+";

set .@Str$,"";
while( getstrlen( .@Str$ ) < getarg(1) )
   set .@Str$,.@Str$ + .@List$[ rand( getarraysize( .@List$ ) ) ];
return .@Str$;

}
}
}

what gave the script every minute not give rewards?

just get it in the first minute and the next stop, is there something wrong? please correct my script, thank you.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

do not combine those script together when you are not really sure how the script running....it will mess up your whole things.....

btw..i cant get what you mean ? what's problem ?

every minute doesnt give reward ? or it give reward every minute ? or etc ?

what stop and first minute ?

:(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

so the function is equal to hourlypoint script, but there is little that I change that to minutes & change hourly script function is to give 671 (silver coin) when using a custom headger 673 (bronze coin) every minute and every hour there is a special gift that is 7306 (token Coin) but to get a special prize shall be by check AntiBot if successful answer will get special gifts and if they can not answer AntiBot is then automatically kick from the server, if you can fix my script?

sorry if my english bad,

I hope you can understand what I mean... :(

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

ok thanks emistry :(

   	 if(checkcart() == 1)
           set @cart,1;
       if(checkfalcon() == 1)
           set @falcon,1;
       if(checkriding() == 1)
           set @riding,1;
       if(checkwarg() == 1)
           set @warg,1;

       if(@cart == 1) {
           setcart;
       }
       if(@falcon == 1) {
           setfalcon;
       }
       if(@riding == 1) {
           setriding;
       }
       if(@warg == 1) {
           setwarg;
       }

I want to add the script above, because each check AntiBot cart, falcon, peco is lost, how to apply the script i fear misplaced.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...