Jump to content

almarket23

Members
  • Content Count

    90
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    almarket23 reacted to Kubix in Script activated once player warped to a map   
    header: { OnPCLoadMapEvent: if( strcharinfo(3) == "prontera" ) announce "Hello, " + strcharinfo(0), bc_self; // self-announce end; } prontera[tab]mapflag[tab]loadevent
    OnPCLoadMapEvent: This special label will trigger once a player steps in a map marked with the 'loadevent' mapflag and attach its RID. The fact that this label requires a mapflag for it to work is because, otherwise, it'd be server-wide and trigger every time a player would change maps. Imagine the server load with 1,000 players (oh the pain...) Only the special labels which are not associated with any script command are listed here. There are other kinds of labels which may be triggered in a similar manner, but they are described with their associated commands.
  2. Upvote
    almarket23 reacted to Dastgir in Can anyone fix this for me please....   
    prontera,150,150,5 script Teleporter 1_M_YOUNGKNIGHT,{
    .n$ = "[ Teleporter ]";
    mes .n$;
    mes "Please enter the Floor Number.";
    mes "===============================";
    mes "List of Active Maps";
    if (query_sql("SELECT id, name, level, status FROM npc ", .@id, .@name$, .@level, .@status)) {
    for (.@i = 0; .@i < getarraysize(.@status); .@i++) {
    if (.@status[.@i] == 1) {
    mes .@name$[.@i];
    }
    }
    }
    next;
    input(.@mapList);
    for (.@i = 0; .@i < getarraysize(.@status); .@i++) {
    if ( .@mapList == .@level && .@status == 1 ) {
    switch(select(.@mapList)){
    case 1:
    warp "prontera", 150, 155;
    break;
    case 2:
    warp "prontera", 150, 155;
    break;
    case 3:
    warp "prontera", 150, 155;
    break;
    case 4:
    warp "prontera", 150, 155;
    break;
    case 5:
    warp "prontera", 150, 155;
    break;
    default:
    mes "No Warp Location Specified";
    close;
    }
    }
    }
    mes .n$;
    mes "Unable to find the Floor number. Please enter the Active Floors.";
    close;
    }

  3. Upvote
    almarket23 reacted to vykimo in Browedit 2.0 - a new revision by Borf   
    Definitly too bugged for use...
  4. Upvote
    almarket23 reacted to Garr in Code Creation Request   
    I think this should work, didn't test it though
    prontera,150,150,5 script codes 89,{ set .@n$,"[code Creator]"; mes .@n$; mes "This code will only work with the help of the Administrator. Please give this code to our Administrator so that they can Reset your System Credential."; next; mes .@n$; mes "Please write this down."; mes "==================================="; for (.@i = 0; .@i< 10; .@i++) { .@ch$ = .codes$[rand(getarraysize(.codes$))]; .@gen$[.@i] = (rand(2)?strtolower(.@ch$):.@ch$); } mes "Your Code is: " + implode(.@gen$); close; OnInit: setarray .codes$[0],"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","1","2","3","4","5","6","7","8","9","0"; end;}
  5. Upvote
    almarket23 reacted to Garr in available options cannot be selected. HELP please   
    Here:
    prontera,150,150,5  script  Usagi  89,{set .@n$, "[Miss Usagi]";checkstatus:query_sql("SELECT char_id,account_id,name,class,base_level,job_level FROM `char` ",@charid,@accntid$,@name$,@class$,@blevel$,@jlevel$);mes .@n$;mes "This are the Players that is already reached the max level. Please choose the player that you want to check the information.";mes "===================================";  for (.@i = 0; .@i < getarraysize(@blevel$); .@i++ ) {    if ("99" == @blevel$[.@i]) {      mes ""+@charid[.@i]+" || "+@name$[.@i]+"";    }  }next;input ( .@level );for (.@i = 0; .@i < getarraysize(@charid); .@i++ )  if( .@level == @charid[.@i])    break;if ( .@i >= getarraysize(@charid) ) {  mes .@n$;  mes "The Character ID that you enter is not available. Please enter the correct Character ID.";  next;  switch(select("Re-enter Character ID")) { goto checkstatus;  }}mes .@n$;mes "Account ID: "+@accntid$[.@i]+"";mes "Character ID: "+@charid[.@i]+"";mes "Name : "+@name$[.@i]+"";mes "Class Type: "+@class$[.@i]+"";mes "Base Level: "+@blevel$[.@i]+"";mes "Job Level: "+@jlevel$[.@i]+"";close;} You needed to go over whole array first, what you were doing is pretty much comparing first value, and if it didn't pass you'd send him to the basic menu. And I have some extra questions:
    a) You know, redoing the query every time a wrong ID is entered is a nice way to refresh the list, but I'd keep it to another talk with NPC and leave the list as it was.
    Why in the world would you get ALL players in the array and compare them to blevel 99 inside script engine when SQL query will do that way faster?
    c) gotos are bad. period.
    d) It'd be more safe to use the number that query returns instead of checking on array size all the time. Not that it's a problem when query is not running every wrong ID you enter, but it's still better to be safe The problem here when the query is refreshing is that it might return less players than before (let's say, GM changed level from 99 to 96 between queries), and that will leave garbage from previous query which getarraysize will count, but number that query_sql returns wouldn't.
    Well, although the above version would work, I'd take the one that I fixed the above remarks in
    prontera,150,150,5 script Usagi 89,{set .@n$, "[Miss Usagi]";.@count = query_sql("SELECT `char_id`,`account_id`,`name`,`class`,`base_level`,`job_level` FROM `char` WHERE `base_level` = 99",@charid,@accntid$,@name$,@class$,@blevel$,@jlevel$); while(1) { mes .@n$; mes "These are the Players who already reached the max level. Please input charID of the player that you want to check on."; mes "==================================="; for (.@i = 0; .@i < .@count; .@i++ ) mes @charid[.@i]+" || "+@name$[.@i]; next; input ( .@cid ); for (.@i = 0; .@i < .@count; .@i++ ) if( .@cid == @charid[.@i]) break; if ( .@i >= .@count ) { mes .@n$; mes "The Character ID that you entered is not available. Please enter the correct Character ID."; next; select("Re-enter Character ID"); continue; // gotos are a nono } mes .@n$; mes "Account ID: "+@accntid$[.@i]; mes "Character ID: "+@charid[.@i]; mes "Name : "+@name$[.@i]; mes "Class Type: "+jobname(@class$[.@i]); mes "Base Level: "+@blevel$[.@i]; mes "Job Level: "+@jlevel$[.@i]; close; }}
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.