Jump to content

Bringer

Members
  • Posts

    746
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Bringer

  1. This Script is made by @Haziel can anyone modfi this ?

    1.Remove 5 hours per day. the timer will reset at 12 midnight.

    2. Hourly Stop When Vending or @autotrade

    Spoiler
    
    -	script	hourly_point_main	-1,{
        
        OnInit:
            .max_hour = 5;
            .duration = 3600;
            .npc_name$ = strnpcinfo(3);
            bindatcmd "hourly",    .npc_name$ + "::OnCheck";
            end;
            
        OnClock0000:
            query_sql( "DELETE FROM acc_reg_num` WHERE `key` = '#daily_hour_count' AND `account_id` IN ( SELECT `account_id` FROM `char` WHERE `login` = 0 GROUP BY `account_id` ) " );
            addrid(0);
            #daily_hour_count = -1;
            
        OnUpdate:
            deltimer .npc_name$+"::OnUpdate";
            #daily_hour_count++;
            switch ( #daily_hour_count ) {
                case 1:
                    //#CASHPOINT += 1;
                    getitem 512,1;
                    break;
                case 2:
                    //#CASHPOINT += 2;
                    getitem 512,2;
                    break;
                case 3:
                    //#CASHPOINT += 3;
                    getitem 512,3;
                    break;
                case 4:
                    //#CASHPOINT += 4;
                    getitem 512,4;
                    break;
                case 5:
                    //#CASHPOINT += 5;
                    getitem 512,6;
                    break;
                default: break;
            }
            
        OnPCLoginEvent:
            if ( #daily_hour_count < .max_hour ) {
                @timer = gettimetick(2) + .duration;
                addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
            }
            if ( #daily_hour_count )    dispbottom "[ Hourly Rewards ] " + #daily_hour_count + "/" + .max_hour + " hour" + ((#daily_hour_count > 1)?"s":"") + " played!",0x9ae2d7;
            end;
            
        OnCheck:
            .@min = (@timer - gettimetick(2))/60;
            .@sec = (@timer - gettimetick(2))%60;
            dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                        ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                        ((.@min && .@sec)?    " and ":"") +
                        ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                        "!",0x9ae2d7;
            end;            
    }

     

     

  2. 22 minutes ago, Cyro said:

     

    
    OnTimer30000:
    //Check if Vending (normal or @at)
    if(checkvending() >= 1) {
        dispbottom "The hourly  rewards has stopped because you were vending . Please relog if you wish to start again.";
        stopnpctimer;
        end;
    }
     

     

    OnPointGet: OnTimer30000: if(checkVending()== 1) { dispbottom "The hourly points event haulted because you were vending."; stopnpctimer; end; } but still the hourly timer not stop

     

  3. Spoiler
    
    -	script	hourlypoints	-1,{
    //--Start of the Script
    OnPCLoginEvent:
    	addtimer .timer,"hourlypoints::OnPointGet";
    	set @hourly_points_timer, gettimetick(2) + ( .timer / 1000 );
    	attachnpctimer ""+strcharinfo(0)+"";
    	initnpctimer;
    	dispbottom "Hourly Rewards have been started for this character.";
    	end;
    
    OnPointGet:
    	OnTimer30000:
    	if(checkVending()== 1) {
    		dispbottom "The hourly points event haulted because you were vending.";
        		stopnpctimer;
    		end;
    		}
    	set #hourlypoints, #hourlypoints + .point_amt;
    	dispbottom "You received "+.point_amt+" Reward Hourly Points by staying ingame for 1 hour";
    	dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	set @consecutive_hour, @consecutive_hour + 1;
    
    	//Check for 2 hours consecutive
    	if(@consecutive_hour == 2) {
    		set #HourlyPoints, #HourlyPoints + .2cpoint_amt;
    		dispbottom "You received "+.2cpoint_amt+" Reward Hourly Points due to playing for 2 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 3 hours consecutive
    	else if(@consecutive_hour == 3) {
    		set #HourlyPoints, #HourlyPoints + .3cpoint_amt;
    		dispbottom "You received "+.3cpoint_amt+" Reward Hourly Points due to playing for 3 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 4 hours consecutive
    	else if(@consecutive_hour == 4) {
    		set #HourlyPoints, #HourlyPoints + .4cpoint_amt;
    		dispbottom "You received "+.4cpoint_amt+" Reward Hourly Points due to playing for 4 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 5 hours consecutive
    	else if(@consecutive_hour == 5) {
    		set #HourlyPoints, #HourlyPoints + .5cpoint_amt;
    		dispbottom "You received "+.5cpoint_amt+" Reward Hourly Points due to playing for 5 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 6 hours consecutive
    	else if(@consecutive_hour == 6) {
    		set #HourlyPoints, #HourlyPoints + .6cpoint_amt;
    		dispbottom "You received "+.6cpoint_amt+" Reward Hourly Points due to playing for 6 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 7 hours consecutive
    	else if(@consecutive_hour == 7) {
    		set #HourlyPoints, #HourlyPoints + .7cpoint_amt;
    		dispbottom "You received "+.7cpoint_amt+" Reward Hourly Points due to playing for 7 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 8 hours consecutive
    	else if(@consecutive_hour == 8) {
    		set @consecutive_hour,0;
    		set #HourlyPoints, #HourlyPoints + .8cpoint_amt;
    		dispbottom "You received "+.8cpoint_amt+" Reward Hourly Points due to playing for 8 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
    	addtimer .timer,"hourlypoints::OnPointGet";
    	end;
    
    OnCmdHour:
    	mes "^0033ff[ War Server ]^000000";
    	mes "Total Hours Online " +@consecutive_hour+ "";
    	mes "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000";
    	mes " ";
    	message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!";
    	end;
    
    OnInit:
        bindatcmd "reward","hourlypoints::OnCmdHour";
        set .timer, 1000*60*60; //Timer in milliseconds.
        set .2cpoint_amt, 20; //Points gained for consecutive time online.
        set .3cpoint_amt, 30; //Points gained for consecutive time online.
        set .4cpoint_amt, 40; //Points gained for consecutive time online.
        set .5cpoint_amt, 50; //Points gained for consecutive time online.
        set .6cpoint_amt, 60; //Points gained for consecutive time online.
        set .7cpoint_amt, 70; //Points gained for consecutive time online.
        set .8cpoint_amt, 80; //Points gained for consecutive time online.    
        set .point_amt, 10; //Normal points gained.
    }

     

    even arleady vending the timer will not stop

  4. On 4/18/2017 at 6:46 PM, Azura Skyy said:

    Try this out. Let me know if it works.

    
    -	script	kdsfksdjhfksdj	-1,{
    OnInit:
    	bindatcmd "buffall", strnpcinfo(0) +"::Onbuff",99,99;
    	end;
    Onbuff:
    	addrid 0,0; // ripped almost entirely from Annieruru's script which ripped a little bit from Winz script
    	skilleffect 34,0; sc_start SC_BLESSING,600000,10;
    	skilleffect 29,0; sc_start SC_INCREASEAGI,600000,10;
    	end;
    }



    Regards,
    ~Azura Skyy

    can you add if the player vending no buff

  5. prontera,121,100,4	script	Race To Max	4_F_GUILLOTINE,{
    	if( BaseLevel < 99 || JobLevel < 70 ){
    	mes "Only level 99 and job 70 can use";
       	end;
    	}
    	mes "[Welcome To Race to Max Event]";
    	mes "Please choose Your job.";
    	menu "Lord Knight",lk;
    lk:
    	callfunc "lordknightrace";
    	end;
    	}
    
    // LK 99
    function	script	lordknightrace	{
    	if (BaseJob==Job_Lord_Knight) {
    	mes "Race to Max Prize";
    	mes "+7 Full Plate [1] (Marc Card) (+3STR)";
    	mes "+10 Pike (x2 Hydra Card) (x2 Skeleton Worker Card)";
    	mes "+7 Wool Scarf (Raydric Card)";
    	mes" +7 Tidal Shoes (Matyr Card)";
    	next;
    	menu "Yes",-,"No",L_QUIT;
    	getitembound2 2317,1,1,7,0,4105,0,0,4702,1;
    	getitembound2 1408,1,1,10,0,4035,4035,4092,4092,1;
    	getitembound2 2528,1,1,7,0,4133,0,0,0,1;
    	getitembound2 2424,1,1,7,0,4097,0,0,0,1;
    	announce "[Race To Max] congratulations " + strcharinfo(0) + "For Winning the Race to Max Event !!",0,0x00FF00;
    	end;
    	} else {
    	next;
    	mes "I'm sorry, but these";
    	mes "are only";
    	mes "Lord Knight.";
    	end;
    L_QUIT:
    	end;
    	}
    }

    Hello i having a problem on my Race to max event script even im lord knight level 99/70 the npc still  rejects me

    can anyone point out where and exactly what part i am doing wrong please

     

    Ok i Found the error 

     

    if (BaseJob==Job_Lord_Knight) {
    to
    if(Class == Job_Lord_Knight) {

     

  6. -	script	hourlypoints	-1,{
    //--Start of the Script
    OnPCLoginEvent:
    	atcommand "@refresh "+strcharinfo(0);
    	addtimer .timer,"hourlypoints::OnPointGet";
    	set @hourly_points_timer, gettimetick(2) + ( .timer / 1000 );
    	dispbottom "Hourly Rewards have been started for this character.";
    	end;
    
    OnPointGet:
    	set #hourlypoints, #hourlypoints + .point_amt;
    	dispbottom "You received "+.point_amt+" Reward Hourly Points by staying ingame for 1 hour";
    	dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	set @consecutive_hour, @consecutive_hour + 1;
    
    	//Check for 2 hours consecutive
    	if(@consecutive_hour == 2) {
    		set #HourlyPoints, #HourlyPoints + .2cpoint_amt;
    		dispbottom "You received "+.2cpoint_amt+" Reward Hourly Points due to playing for 2 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    
    	}
        
    	//Check for 3 hours consecutive
    	else if(@consecutive_hour == 3) {
    		set #HourlyPoints, #HourlyPoints + .3cpoint_amt;
    		dispbottom "You received "+.3cpoint_amt+" Reward Hourly Points due to playing for 3 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 4 hours consecutive
    	else if(@consecutive_hour == 4) {
    		set #HourlyPoints, #HourlyPoints + .4cpoint_amt;
    		dispbottom "You received "+.4cpoint_amt+" Reward Hourly Points due to playing for 4 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 5 hours consecutive
    	else if(@consecutive_hour == 5) {
    		set #HourlyPoints, #HourlyPoints + .5cpoint_amt;
    		dispbottom "You received "+.5cpoint_amt+" Reward Hourly Points due to playing for 5 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 6 hours consecutive
    	else if(@consecutive_hour == 6) {
    		set #HourlyPoints, #HourlyPoints + .6cpoint_amt;
    		dispbottom "You received "+.6cpoint_amt+" Reward Hourly Points due to playing for 6 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 7 hours consecutive
    	else if(@consecutive_hour == 7) {
    		set #HourlyPoints, #HourlyPoints + .7cpoint_amt;
    		dispbottom "You received "+.7cpoint_amt+" Reward Hourly Points due to playing for 7 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    		set @consecutive_hour, @consecutive_hour + 1;
    	}
        
    	//Check for 8 hours consecutive
    	else if(@consecutive_hour == 8) {
    		set @consecutive_hour,0;
    		set #HourlyPoints, #HourlyPoints + .8cpoint_amt;
    		dispbottom "You received "+.8cpoint_amt+" Reward Hourly Points due to playing for 8 consecutive hours";
    		dispbottom "Current Balance = "+#HourlyPoints+" Reward Hourly Points";
    	}
    	addtimer .timer,"hourlypoints::OnPointGet";
    	end;
    
    OnCmdHour:
    	mes "^0033ff[ War Server ]^000000";
    	mes "Total Hours Online " +@consecutive_hour+ "";
    	mes "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000";
    	mes " ";
    	message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!";
    	end;
    
    OnInit:
        bindatcmd "reward","hourlypoints::OnCmdHour";
        set .timer, 1000*60*60; //Timer in milliseconds.
        set .2cpoint_amt, 20;
        set .3cpoint_amt, 30;
        set .4cpoint_amt, 40;
        set .5cpoint_amt, 50;
        set .6cpoint_amt, 60;
        set .7cpoint_amt, 70;
        set .8cpoint_amt, 80; 
        set .point_amt, 10; //Normal points gained.
    }

    there 's a problem or a bug on the timer of hourly time remaining. Once i got the one hour reward points and i use @reward the timer show blank message. please check screenshot attached

     

     

  7. 10 hours ago, Jey said:

    Try to avoid using freeloop. The infinity loop is caused by a wrong condition:

    
    if ( getgmlevel() < 100 && !checkvending() ) {
    	DetachRID();
    	continue;
    }

    This will detach every non GM (needs at least level 100) and non vending player. Better would be:

    
    if ( getgmlevel() > 0 || // ignores GMs
    	 checkvending()   || // ignores Vender
         checkweight(32000,1) == 0 || // Checkweight failed
    	 checkidle() > 60 ) { // ignores AFK-Player (should also include venders)

    I just had a look in an own script. It's pretty much the same, but differs from the time (not every hour at minute zero). And it just waits ten seconds, if it fails.

    
    
    
    OnMinute00:
    //Damit das ein wenig interessanter wird, wird der Coin nicht genau zur vollen
    //Stunde ausgeteilt, sondern irgendwann innerhalb dieser Stunde.
    	stopnpctimer;
    	initnpctimer;
    	setnpctimer(rand(0,3540000));
    	end;
    OnTimer3545000:
    	stopnpctimer;
    	query_sql "SELECT `account_id` FROM `char` WHERE `online` = '1' ORDER BY RAND() LIMIT 0,1",.@accid;
    	if( getarraysize(.@accid) != 1 ) end;
    	attachrid .@accid[0]; //Player attached
    	if( checkweight(32000,1) == 0 || checkidle() > 60 || getgmlevel() > 0 )
    	{
    		setnpctimer(3535000); //Evtl. Wird in 10 Sekunden jemand gefunden, der nicht afk ist.
    		startnpctimer;
    		end;
    	}
    	getitem 32000,1;
    	switch(rand(17)) {
    		case 0: announce "["+strcharinfo(0)+"] ist ein richtiger Glückspilz und findet einen Coin hinter "+((Sex)?"seinem":"ihrem")+" Sofa.",b_all; break;
    // [...]

    (Sorry in German, but you'll get the point)

    Spoiler
    
    -	script	AutoPickEvent	-1,{
     
    OnMinute00: 
    	while(1)
    	{
    	query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid;
    	attachrid .@aid;
    if ( getgmlevel() > 0 || // ignores GMs
    	 checkvending() ) {   || // ignores Vender
    	DetachRID();
    	continue;
      	}
    	announce strcharinfo(0) +" won 1 Hourly Coin in Lucky Pick Event.",0,0x00FF00;
    	getitem 31060,1;
    	//set #HourlyPoints,#HourlyPoints+100;
    	//dispbottom "You got 100 Hourly Points";
    	break;
    	}
    	end;
    }

     

    should be like this ?

  8. Spoiler
    
    -	script	AutoPickEvent	-1,{
     
    OnMinute00: 
    	while(1)
    	{
    	query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid;
    	attachrid .@aid;
    	if ( getgmlevel() < 100 && !checkvending() ) {
    	DetachRID();
    	continue;
      	}
    	announce strcharinfo(0) +" won 1 Hourly Coin in Lucky Pick Event.",0,0x00FF00;
    	getitem 31060,1;
    	break;
    	}
    	end;
    }

     

    Error on my Map Server 

     

  9. hello rathena i want to add this event bind command on this event and remaining time how ?

    For Bind command

        bindatcmd "hunt","Monster Challenge::OnhuntHour";

    What about the Timer? is this correct?

     

    set @hunt_timer, gettimetick(2);

    OnhuntHour:
    	mes "^0033ff[ War Server ]^000000";
    	mes "Reward Hourly Points : ^FF0000[ "+#HourlyPoints+" ]^000000";
    	mes " ";
    	mes "@hunt_timer ? Time2Str( @hunt_timer )+" Remaining.":"Something went wrong relog!";
    	end;

     

    Spoiler
    
    //======Name========================================
    // Daily Monster Hunt
    //======Version=====================================
    // 1.2
    //======Author(s)===================================
    // Sandbox
    //======Comments====================================
    // This NPC allows your player to hunt a random amount
    // of a random monster
    // *randomception!*
    // If the player successfully hunts the monster
    // he'll receive a reward!
    //======Credits=====================================
    // KeyWorld, nanakiwurtz, NeoMind, Kido
    // Thanks for helping me out guize!
    // Modified by Luciar for Yonko
    //==================================================
     
    prontera,111,99,5	script	Monster Challenge	668,{
     
    mes .Npc_Name$;
    	if(Hunter) {
    	mes "You have killed ^880000"+HuntCount+"^000000/^0000FF"+Amt
     
    +"^000000 "+getmonsterinfo(Hunt,0)+"s, keep it up!";
    	close;
    	}
    	if(gettimetick(2) < HuntDelay) {
    		mes "You can only do this quest Every 2 Hours!";
    		close;
    	}
    
    mes "Hello, do you want to take on the Monster Hunting Challenge?","If you manage to kill them, you'll receive a 1 Hourly Coin Reward!"; 
    if(select("Bring it on!:How about no?")==2) {
    	mes .Npc_Name$;
    	mes "Fine!";
    	close;
    }
     
    next;
    mes .Npc_Name$;
    	Hunt = .Mob_List[rand(getarraysize(.Mob_List))];
    	Amt = rand (35,50); //Amount of mob to hunt
    	Hunter++;
     
    mes "You have to hunt ^0000FF"+Amt+" "+getmonsterinfo(Hunt,0)+"^000000!";
    next;
    mes .Npc_Name$;
    mes "Go go go!";
    close2;
    HuntDelay = gettimetick(2)+7200; //2hours.
    end;
    
     
    //----------Config----------
     
    OnInit:
    	.Npc_Name$ = "[^0000FF Monster Challenge ^000000]";
    	setarray .Mob_List[0],1002,1007,1063,1011,1107,1113,1047,1049,1052,1012,1010; //Mobs to hunt. Default: Poring, Fabre, Lunatic
    	.Reward = 31060; //Reward ID
    	.RewAmt = 1; //Reward Amount
    	end;
                                      
    OnNPCKillEvent:
    	if(Hunter > 0) {
    		if(killedrid == Hunt) {
    			HuntCount++;
    			dispbottom "You have killed "+HuntCount+"/"+Amt+" "+getmonsterinfo(Hunt,0)+"s, keep it up!";
    			if(HuntCount >= Amt) {
    				//dispbottom strnpcinfo(1)+": Congratulations! You did it!";
    				announce "Congratulations! You did it! "+strcharinfo(0)+" You Finished The Monster Challenge!!",0;
    				getitem .Reward,.RewAmt;
    				Hunt = 0;
    				Hunter = 0;
    				HuntCount = 0;
    				Amt = 0;
    			}
    		}
    	}
    end;
    }
    
    morocc,159,97,4	duplicate(Monster Challenge)	Monster Challenge#2	668
    payon,184,104,4	duplicate(Monster Challenge)	Monster Challenge#3	668

     

     

  10. 8 hours ago, Skorm said:

    ...

    
    -	script	hourly_point_main	-1,{
        
        OnInit:
            .max_hour = 5;
            .duration = 3600;
            .npc_name$ = strnpcinfo(3);
            .vip_multi = 2;
            bindatcmd "hourly", .npc_name$ + "::OnCheck";
            end;
    		
        OnClock0000:
            deletearray $@hourly_tick;
            
        OnUpdate:
    		.@aid = getcharid(3) & 0xFFFF;
    		deltimer .npc_name$+"::OnUpdate";
    		$@hourly_ticks[.@aid]++;
    		#reward += $@hourly_ticks[.@aid] * 10 * ( vip_status(1) ? .vip_multi : 1 );
            
        OnPCLoginEvent:
    		.@aid = getcharid(3) & 0xFFFF;
    		if ( $@hourly_ticks[.@aid] < .max_hour ) {
    			@timer = gettimetick(2) + .duration;
    			addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate";
    		} else {
    			dispbottom "[ Hourly Rewards ] You've reached the daily maximum of "+.max_hour+" hours played, well done!",0x9ae2d7;
    			end;
    		}
    		if ( #reward && $@hourly_ticks[.@aid] )
    			dispbottom "[ Hourly Rewards ] " + $@hourly_ticks[.@aid] + "/" + .max_hour + " hours played, "+#reward+" point(s)!",0x9ae2d7;
    		end;
            
        OnCheck:
            .@min = (@timer - gettimetick(2))/60;
            .@sec = (@timer - gettimetick(2))%60;
            dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " +
                        ((.@min)?            "[ " + .@min + " ] minute"         + ((.@min > 1)?"s":""):"") +
                        ((.@min && .@sec)?    " and ":"") +
                        ((.@sec)?            "[ " + .@sec + " ] second"    + ((.@sec > 1)?"s":""):"") +
                        "!",0x9ae2d7;
            end;            
    }

     

    Hello Sir i want to use your Hourly System
    1.Please Remove the Max Hour
    2.Vendor will stop the hourly system
    4. additional 50% points for VIP Players. { DONE }

  11. prontera,145,150,5	script	Sample	56,{
    	if( BaseLevel == 99 && JobLevel == 700 && reward_lvl == 0 && Upper && .count < 100 ){
    		if( .count < 3 )
    			getitem 714,1;
    		if( .count < 100 )
    			getitem 7227,1;
    		reward_lvl++;
    		.count++;
    		announce "Congratulations " + strcharinfo(0) + " for receiving the level 99 reward, there are only "+ (100-.count) +" rewards left!",0;
    	}
    	else if ( reward_lvl ) {
    		mes "you already get your reward";
    		close;
    	}
    	else if ( BaseLevel != 99 && JobLevel != 70 ) {
    		mes "you are not lvl 99/70 ";
    		close;
    	}
    	end;
    OnInit:
    	.count = query_sql( "select `value` from `global_reg_value` where `str`= 'reward_lvl'", .@value );
    	if ( .count >99 ) end;
    // limit to 127 players online here
    	.@size = query_sql( "select `account_id` from `char` where `char_id` not in ( select `char_id` from `global_reg_value` where `str`= 'reward_lvl' ) and `online`=1", .@account_id );
    	for ( .@i = 0; .@i < .@size; .@i++ ) {
    		attachrid .@account_id[.@i];
    		if ( reward_lvl ) {
    			.count++;
    			if ( .count >99 ) end;
    		}
    	}
    	end;
    }

    solved 

    `global_reg_value` to `acc_reg_num` 

    `str` to `key`

  12. 47 minutes ago, mirabell said:

    I'm trying this but i don't see any difference in SP or HP recovery 

    if(BaseLevel<=50) {  bonus bMaxHPrate,100; bMaxSPrate,100;}

    Basically im trying to make a item that will recover lower levels hp and sp  quickly till max level 50. I tried this and I tested the sp and hp recovery and it was the same no difference so maybe i did something wrong ?. Thank you

    Description Maximum SP + 15%
    SP Recovery + 3%
    Item Script
    { bonus bMaxSPrate,15; bonus bSPrecovRate,3; },{},{}
  13. 1 hour ago, Brahms said:

    Im just newbie sir specially in src modification.. if you dont mind sir, can you just give me the exact modification to be made then ill just going to try it.. if its ok sir... Thank you for this sir..

    you can search them skill.c just replace what playtester said and alwys backup your skill.c

×
×
  • Create New...