Jump to content
  • 0

Help on This Script Timer!


PewN

Question


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

I want to after i attach the player. the timer will start then on timerup it will jail. please help the timer doesn't star eeergg!!"


Seasonia,151,109,4 script Police 852,{
Main:
cutin "ein_soldier",2;
mes "[ Police ]";
mes "Do you have a suspect botter?";
next;
switch(select("Yes:No")){

case 1:
mes "[ Police ]";
mes "Please input the name!";
input .@name$;
query_sql "SELECT `char_id` FROM `char` WHERE `name` = '"+.@name$+"'",.@charid;
if (!.@charid) { mes "The name is invalid."; next; goto Main; }
else set .@charid,0;
mes "[ Police ]";
mes "thx for reporting!";
close2;
cutin "",255;
attachrid( getcharid(3,.@name$) );
callfunc("propaganda",.@name$);



case 2:
mes "[ Police ]";
mes "Okay bye!";
close2;
cutin "",255;
end;



}
}


function script propaganda {

set .@ranbot,rand(1,5);
sc_start SC_BERSERK,10000000,1;
atcommand "@option 2";
cutin "ein_soldier",2;
initnpctimer;

if (.@ranbot == 1) {
mes "[ Police ]";
mes "What is your name!";
input .@Input$;
if( .@Input$ == strcharinfo(0) ){
mes "Correct.";
close2;
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
cutin "",255;
detachrid;
end;
} else {
mes "[ Police ]";
mes "Wrong!";
close2;
cutin "",255;
atcommand "@jail "+strcharinfo(0)+"";
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
detachrid;
end;
}
}


if (.@ranbot == 2) {
mes "[ Police ]";
mes "if ^0000FFA^000000 = 3, ^FF0000B^000000 = 7, ^008000C^000000 = 10";
mes "^0000FFA^000000 + ^008000C^000000 - ^FF0000B^000000 = ?";
input .@pwd;
if(.@pwd == "6"){
mes "[ Police ]";
mes "Correct!";
close2;
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
cutin "",255;
detachrid;
end;
} else {
mes "[ Police ]";
mes "Wrong!";
close2;
cutin "",255;
atcommand "@jail "+strcharinfo(0)+"";
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
detachrid;
end;
}
}


if (.@ranbot == 3) {
mes "[ Police ]";
mes "Type the Code given!";
set .@str$,"";
for(set .@i,0; .@i<10; set .@i,.@i+1)
set .@str$, .@str$+rand(9);
mes .@str$;
input .@i$;
if (.@i$ == .@str$){
mes "[ Police ]";
mes "Correct!";
close2;
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
cutin "",255;
detachrid;
end;
} else {
mes "[ Police ]";
mes "Wrong!";
close2;
cutin "",255;
atcommand "@jail "+strcharinfo(0)+"";
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
detachrid;
end;
}
}

if (.@ranbot == 4) {
mes "[ Police ]";
mes "What is the name of this RO?";
mes " Type the Word given:";
mes "   ^0000FF Tykes Pogi ^000000";
input .@server$;
if(.@server$ == "Tykes Pogi"){
mes "[ Police ]";
mes "Correct!";
close2;
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
cutin "",255;
detachrid;
end;
} else {
mes "[ Police ]";
mes "Wrong!";
close2;
cutin "",255;
atcommand "@jail "+strcharinfo(0)+"";
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
detachrid;
end;
}
}

if (.@ranbot == 5) {
atcommand "@disguise 1063";
mes "[ Police ]";
mes "What kind of monster are you?";
mes "Clue : ";
mes "   ^0000FFL_n_t_c^000000";
input .@poring$;
if(.@poring$ == "Lunatic"){
atcommand "@undisguise";
mes "[ Police ]";
mes "Correct!";
close2;
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
cutin "",255;
detachrid;
end;
} else {
atcommand "@undisguise";
mes "[ Police ]";
mes "Wrong!";
close2;
cutin "",255;
atcommand "@jail "+strcharinfo(0)+"";
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
detachrid;
end;

OnTimer0000:
    announce "Timer Start's Now!", bc_self|#008000;
    end;

OnTimer10000:
    announce "Last 50 Seconds!!", bc_self|#008000;
    end;

OnTimer30000:
    announce "Last 30 Seconds!!", bc_self|#008000;
    end;

OnTimer50000:
    announce "Last 10 Seconds!!", bc_self|#008000;
    end;

OnTimer55000:
    announce "Last 5 Seconds!!", bc_self|#008000;
    end;

OnTimer60000:
atcommand "@jail "+strcharinfo(0)+"";
atcommand "@option 0";
sc_end SC_BERSERK;
percentheal 100,100;
end;



}
}
}

bump!
bump! please help
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


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

try this just simply sketch ......

http://pastebin.com/raw.php?i=ijZvh1XJ

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

''function'' isn't npc

thx now i know that one! :D

try this just simply sketch ......

http://pastebin.com/raw.php?i=ijZvh1XJ

thx emistry! :D

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...