Jump to content

GenGen

Members
  • Posts

    48
  • Joined

  • Last visited

Posts posted by GenGen

  1. Hi, I'm using this client everything is perfect.

    however can someone tell me where did i did wrong, i job change into other class but still novice sprite.
    do i need to apply the .diff file first?

    image.png.2b69eddd43c20b62ca4742ee0cce49b6.png

  2. On 12/8/2018 at 5:32 AM, n0tttt said:

    There're some errors.

    set .map$, "quiz_02"; It should be a string variable. All the "unexpected"errors are because of that.

    OnAgitEnd doesn't have a player attached, it just gets executed as WoE ends, so obviously dispbottom won't work.

    
    quiz_02,304,263,6	script	WOE Reward	714,{
    	mes "WOE";
    	mes "You did a great job!";
        	mes "Here is your reward.";
        	getitem 13550,20;
    	getitem 13989,50;
    	getitem 14004,2;
    	getitem 675,1;    //add your rewards here
    	set woereward,0;
    	next;
    	warp "SavePoint",0,0;
        	end;
    
    OnInit:
    	waitingroom "WOE Reward",0;
    	end;
    
    }
    
    -	script	woe_reward	-1,{
    OnInit:
            set .map$, "quiz_02";
            set .x, 304;
            set .y, 255;
    	setarray .castles$[0],
    		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
    		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
    		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
    		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
    		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
    		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
            end;
    
    
    
    OnMapLoadEvent:
    	if ((agitcheck() || agitcheck2()) && inarray(.castles$,strcharinfo(3))) {
    		set woereward,1;
    		end;
    	}
    	end;
    
    OnAgitEnd2:
    
    	set .@i,20;
    
    OnAgitEnd:
            set .@size,((.@i == 0)? 19 : getarraysize(.castles$));
            sleep 5000;    // wait 5 seconds after woe before warping the guild
    	for (;.@i < .@size; set .@i, .@i+1){
    		set .@guild,getcastledata(.castles$[.@i],CD_GUILD_ID);
    		if(.@guild) {
    			set .@gm,getguildmasterid(.@guild);
    			set .@j,inarray(.@guild_winners,.@guild);
    			if(.@j == -1) {
    				set .@guild_winners[.@k++],.@guild;
               		warpguild .map$,.x,.y,.@guild;
    				dispbottom "[ War of Emperium ] : Congrats! Your guild wins!",.@gm;
                }
    		}
         }
    	.@n = getunits(BL_PC,.@player);
    	freeloop true;
    	for(set .@i,0; .@i < .@n; set .@i, .@i+1){
    		attachrid .@player[.@i];
    		.@guild = getcharid(2);
    		if(.@guild) {
    			if(inarray(.@guild_winners,.@guild) == -1 && woereward) {
    				dispbottom "[ War of Emperium ] : Its okay, you can try harder on next WoE!";
    				getitem 607,1;
    				set woereward,0;
    			}
    		}
    	}
    	freeloop false;
    	end;
    }

     

    Untitled.png.3b12c1f027d7e95195859be538d72cc4.png

    Ah I see, thanks for the explanation, however I get this error while trying the your script.

  3. quiz_02,304,263,6	script	WOE Reward	714,{
    	mes "WOE";
    	mes "You did a great job!";
        	mes "Here is your reward.";
        	getitem 13550,20;
    	getitem 13989,50;
    	getitem 14004,2;
    	getitem 675,1;    //add your rewards here
    	set woereward,0;
    	next;
    	warp "SavePoint",0,0;
        	end;
    
    OnInit:
    	waitingroom "WOE Reward",0;
    	end;
    
    }
    
    -	script	woe_reward	-1,{
    OnInit:
            set .map, "quiz_02";
            set .x, 304;
            set .y, 255;
    	setarray .castles$[0],
    		"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
    		"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
    		"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
    		"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
    		"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
    		"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";
            end;
    
    
    
    OnMapLoadEvent:
    	if ((agitcheck() && agitcheck2()) && (strcharinfo(3) == .castles$)){
    	set woereward,1;
    	end;
    	}
    
    OnAgitEnd:
            sleep 5000;    // wait 5 seconds after woe before warping the guild
    	for (set .@i,0; .@i < getarraysize(.castles$); set .@i, .@i+1){
               	warpguild .map,.x,.y,getcastledata(.castles$[.@i],1);
    		dispbottom "[ War of Emperium ] : Congrats! Your guild wins!";
    		end;
            }
    	if (getcastledata(.castles$[.@i],1) != getcharid(2) && woereward==1){
    	dispbottom "[ War of Emperium ] : Its okay, you can try harder on next WoE!";
    	getitem 607,1;
    	set woereward,0;
    	end;
    	}
    	
    
    
    OnAgitEnd2:
    	sleep 5000;    // wait 5 seconds after woe before warping the guild
    	for (set .@i,0; .@i < getarraysize(.castles$); set .@i, .@i+1){
               	warpguild .map,.x,.y,getcastledata(.castles$[.@i],1);
    		end;
            }
    	if (getcastledata(.castles$[.@i],1) != getcharid(2) && woereward==1){
    	dispbottom "[ War of Emperium ] : Its okay, you can try harder on next WoE!";
    	getitem 607,1;
    	set woereward,0;
    	end;
    	}
    }

    Hello Rathena!

    Need help with my script. It wont recall winner nor give reward to participants.

    This script should give reward to the winners, and also consolation prize to losers that participate in WoE.

    But I'm getting error.

    error.png.c837bb43c9df1f937e491cb6eb8561bf.png

    Thanks in advance, Rathena!

    woe1.txt

  4. prontera,155,181,5    script    Sample    718,{
    set .Hour,24;
    if( #dailytimer < gettimetick(2) ) {
       mes "You have Gained a Daily Gift.";
       set #dailytimer,gettimetick(2) + ( .Hour * 3600 );
       getitem 6101,1; //set the price here
    }else{
       set .@last,#dailytimer - gettimetick(2);
       set .@hour, .@last % ( 24 * 3600 ) / 3600;
       set .@min,  .@last % ( 24 * 3600 ) % 3600 / 60;
       set .@sec,  .@last % ( 24 * 3600 ) % 3600 % 60;
       mes "You have to wait to get your next Daily Gift.";
       mes "Time CountDown : ^FF0000"+.@hour+":"+.@min+":"+.@sec+"^000000";
       }
    close;
    }
    

  5. 
    [server]
    server_name = Leatrik Ragnarok Online
    notice_url = crew08.crewbytes.com/index.html
    patch_site = crew08.crewbytes.com
    patch_port = 80
    patch_list = /update.txt
    patch_folder = /
    executable = lro.exe
    ragexe_call = lro.exe 1rag1
    registration_link = http://crewbytes.com
    skin = skin
    grf_file = lro.grf
    Backup_GRF = 0
    startup_option = 2
    [general]
    ;debug_mode = 0
    archive_passphrase =
    

  6. ---------------------------

    Error

    ---------------------------

    C:\Users\USER\Desktop\Ragnarok\Gravity\data\RixSquirrel_10.eot ÆÄÀÏ ¾øÀ½!

    ---------------------------

    OK

    ---------------------------

    i have this error when i trying to run my hexed rathena's client.

  7. Payment Wall Ping Back Example for Virtual Currency

    <?php
    define('SECRET', 'd9bee051cfe5613c6a2ddb513ad52fd9');
    define('CREDIT_TYPE_CHARGEBACK', 2);
    $ipsWhitelist = array(
        '174.36.92.186',
        '174.36.96.66',
        '174.36.92.187',
        '174.36.92.192',
        '174.37.14.28'
    );
    $userId = isset($_GET['uid']) ? $_GET['uid'] : null;
    $credits = isset($_GET['currency']) ? $_GET['currency'] : null;
    $type = isset($_GET['type']) ? $_GET['type'] : null;
    $refId = isset($_GET['ref']) ? $_GET['ref'] : null;
    $signature = isset($_GET['sig']) ? $_GET['sig'] : null;
    $result = false;
    if (!empty($userId) && !empty($credits) && isset($type) && !empty($refId) && !empty($signature)) {
        $signatureParams = array(
    		    'uid' => $userId,
    		    'currency' => $credits,
    		    'type' => $type,
    		    'ref' => $refId
        );
        $signatureCalculated = generateSignature($signatureParams, SECRET);
        // check if IP is in whitelist and if signature matches
        if (in_array($_SERVER['REMOTE_ADDR'], $ipsWhitelist) && ($signature == $signatureCalculated)) {
    		    $result = true;
    
    		    if ($type == CREDIT_TYPE_CHARGEBACK) {
    
    				    // Deduct credits from user
    				    // This is optional, but we recommend this type of crediting to be implemented as well
    				    // Note that currency amount sent for chargeback is negative, e.g. -5, so be caferul about the sign
    				    // Don’t deduct negative number, otherwise user will get credits instead of losing them
    
    		    }
    		    else {
    
    				    // Give credits to user
    
    		    }
        }
    }
    if ($result) {
        echo 'OK';
    }
    function generateSignature($params, $secret) {
        $str = '';
        foreach ($params as $k=>$v) {
    		    $str .= "$k=$v";
        }
        $str .= $secret;
        return md5($str);
    }
    

    Payment wall ping back example for subscription

    <?php
    define('SECRET', 'ab896ebbfc0bc708defd01928b25eff6');
    define('CREDIT_TYPE_CHARGEBACK', 2);
    $ipsWhitelist = array(
    '174.36.92.186',
    '174.36.96.66',
    '174.36.92.187',
    '174.36.92.192',
    '174.37.14.28'
    );
    $userId = isset($_GET['uid']) ? $_GET['uid'] : null;
    $goodsId = isset($_GET['goodsid']) ? $_GET['goodsid'] : null;
    $length = isset($_GET['slength']) ? $_GET['slength'] : null;
    $period = isset($_GET['speriod']) ? $_GET['speriod'] : null;
    $type = isset($_GET['type']) ? $_GET['type'] : null;
    $refId = isset($_GET['ref']) ? $_GET['ref'] : null;
    $signature = isset($_GET['sig']) ? $_GET['sig'] : null;
    $result = false;
    if (!empty($userId) && !empty($goodsId) && isset($type) && !empty($refId) && !empty($signature)) {
    $signatureParams = array(
     'uid' => $userId,
     'goodsid' => $goodsId,
     'slength' => $length,
     'speriod' => $period,
     'type' => $type,
     'ref' => $refId
    );
    $signatureCalculated = generateSignature($signatureParams, SECRET);
    // check if IP is in whitelist and if signature matches
    if (in_array($_SERVER['REMOTE_ADDR'], $ipsWhitelist) && ($signature == $signatureCalculated)) {
     $result = true;
    
     if ($type == CREDIT_TYPE_CHARGEBACK) {
    
      // Take membership from user
      // This is optional, but we recommend this type of crediting to be implemented as well
    
     }
     else {
      // Give membership to user
     }
    }
    }
    if ($result) {
    echo 'OK';
    }
    /**
    * Generates signature using given parameters array and secret
    *
    * @param array $params
    * @param string $secret
    * @return string
    */
    function generateSignature($params, $secret) {
    $str = '';
    foreach ($params as $k=>$v) {
     $str .= "$k=$v";
    }
    $str .= $secret;
    return md5($str);
    }
    

    $userid = $params->get('userid);

    <iframe src="http://wallapi.com/api/ps/?key=ab6d1a924fb8ee2202518c0ee251b815&uid=$userid&widget=p1_1" width="620" height="800" frameborder="0"></iframe>
    

    i think this fix it?

×
×
  • Create New...