Jump to content

NexusXVI

Members
  • Posts

    227
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by NexusXVI

  1. Is it possible to have a different empeium on each and every castle?

    With Different MOB ID's (Custom EMPERIUM perhaps)>?

    Because I want to have a baby woe with no custom items nor mvp card enabled :D
    my current emperium hp is on 3M and they literally spend 40mins just to break it .. which is kinda discouraging.

  2. Well I have this WoE on prt castles and geffen castles

     I need a different Emperium on Geffen Castle a little less hp but has different race and element (I can do the emp)

    Meaning the Emperium on Prt Castles are literally Different with the Gef Castles

    But because they both read the same mob which is 1288 ,

    I can't really make a decent script cause I don't have that much talent yet :D


    explain what you need
     

    So I need a cute script that will make a simple new Emperium on gef castle :D!


    bumb

  3. So is making a new emperium on a different castle imposible?


    if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
            monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
    }
    else(!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")){
    monster strnpcinfo(2),.@emproom[2],.@emproom[3],"Emperium",4000,1,"Agi#"+strnpcinfo(2)+"::OnAgitBreak";
        }
        end;

    you can't give an argument to else,
     

    if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
    monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
    }

    means, if there are no monster emperium. it will spawn a new one

    else(!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")){
    monster strnpcinfo(2),.@emproom[2],.@emproom[3],"Emperium",4000,1,"Agi#"+strnpcinfo(2)+"::OnAgitBreak";
        }

    and this isn't correct, even correct it will be spawn new emperium event the other emperium still in castle

     

    So is making a new emperium on a different castle imposible?

  4. On AgitMain saw this line

     

    if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
    		monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
    	}
    	end;
    

    I was wondering what if I made a new emperium or an emperium of different kind and hp. im not that sure but is this right?

     

    if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
    		monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
           }
    else(!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")){
                    monster strnpcinfo(2),.@emproom[2],.@emproom[3],"Emperium",4000,1,"Agi#"+strnpcinfo(2)+"::OnAgitBreak";
    	}
    	end;
    

    And mayber changing this :

     

    	else if (strnpcinfo(2) == "gefg_cas01") { setarray .@emproom[0],197,181; }
    	else if (strnpcinfo(2) == "gefg_cas02") { setarray .@emproom[0],176,178; }
    	else if (strnpcinfo(2) == "gefg_cas03") { setarray .@emproom[0],244,166; }
    	else if (strnpcinfo(2) == "gefg_cas04") { setarray .@emproom[0],174,177; }
    	else if (strnpcinfo(2) == "gefg_cas05") { setarray .@emproom[0],194,184; }
    

    into this :

     

    	else if (strnpcinfo(2) == "gefg_cas01") { setarray .@emproom[2],197,181; }
    	else if (strnpcinfo(2) == "gefg_cas02") { setarray .@emproom[2],176,178; }
    	else if (strnpcinfo(2) == "gefg_cas03") { setarray .@emproom[2],244,166; }
    	else if (strnpcinfo(2) == "gefg_cas04") { setarray .@emproom[2],174,177; }
    	else if (strnpcinfo(2) == "gefg_cas05") { setarray .@emproom[2],194,184; }
    

    is that possible? I would like some comments from the pro's xD

  5. It is possible to set the Maximum ASPD of a certain Job differently from others?

    Ex. Server Max ASPD for trans is 195
    while for Normal Second Job it is 190


     

  6. you have duplicated contents.....drop/remove the old contents.

    Dropped and retested, it seems that only 1 player can redeem it once meaning ,

    Ex. Player 1 got the code, entered the code, got the reward and re - entered the code again and got the message "You can only redeem once"

    Then Player 1 tells Player 2 the code ,

    Player 2 got the code , entered the code, got the reward, re - enter the code, got another reward, re - enter the code and then got another reward :D

    Every Reward he gets gives the SQL Error

     

    [SQL]: DB error - Duplicate entry 'pw5br2cg7q' for key 'PRIMARY'
    [Debug]: at script.c:15156 - INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('pw5br2cg7q',NOW(),2000312)
    [Debug]: Source (NPC): promoclaim (invisible/not on a map)
    

    PS. This is the option on Using it on multiple accounts, meaning the code can and must be used on different account once!

    To make it more clear here is the pictures :

    1. The Options

    1_zps1be22a51.png

    2. Either usable on 1 or more accounts, Selected 0 (Zero) so it can be used by other accounts but only once :D

     

    2_zpsd804dcb9.png

    3. The Issue,

    The first picture was on the first one to claim the said price.. The price is 7608 (Premium Ticket) *ignore the blank card*

    as you can see he claimed it only once..the second time he tried the code a confirmation appears "You already claimed this promotional code." Which is what I was hoping for. but....

    3_zps2eca5e91.png

    The second picture shows the second one to claim the price., he/she can get the price over and over and over again.. as long as he/she is not the first one to claim it..

    4_zps10473087.png

    I hope you understand me now :D

    and im guessing it's on the table so here it is :

     

    CREATE TABLE IF NOT EXISTS `reward_codes` (
      `code` varchar(10) NOT NULL DEFAULT '',
      `nameid` int(11) unsigned NOT NULL DEFAULT '0',
      `item_name` varchar(45) NOT NULL DEFAULT '',
      `amount` smallint(6) unsigned NOT NULL DEFAULT '0',
      `time_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `allow_multiple` int(11) NOT NULL,
      PRIMARY KEY (`code`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    CREATE TABLE IF NOT EXISTS `rewardlogs` (
      `code` varchar(10) NOT NULL DEFAULT '',
      `redeem_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `account_id` int(11) unsigned NOT NULL DEFAULT '0',
      PRIMARY KEY (`code`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    

    Bump

  7.  

    change your whole OnClaim part into this

    OnClaim:
    	mes "^FF0000 Enter your promotional code.";
    	input .@pc$;
    	close2;
    	if( query_sql("SELECT nameid,amount FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'",.@item,.@amt) == 0 ){
    		dispbottom "Invalid promotional code."; 
    	}
    	else if( query_logsql("SELECT code,account_id FROM `rewardlogs` WHERE `code`='"+escape_sql(.@pc$)+"' AND `account_id`='"+getcharid(3)+"'",.@code$,.@aid ) ){
    		dispbottom "You already claimed this promotional code.";
    	}
    	else if( query_logsql("SELECT code,allow_multiple FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"' AND `allow_multiple`='1'",.@code$,.@multi ) ){
    		getitem .@item,.@amt;
    		dispbottom "Promotional code successfully redeemed."; 
    		query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'", .@pcode_exists);
    		if(.@pcode_exists){
    			query_sql ("DELETE FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'");
    		}
    		else{
    			dispbottom "Promotional code not found."; 
    		}
    		end;
    	}
    	else if( query_logsql("SELECT code,allow_multiple FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"' AND `allow_multiple`='0'",.@code$,.@multi ) ){ 
    		getitem .@item,.@amt; dispbottom "Promotional code successfully redeemed.";
    		query_logsql("INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('"+.@pc$+"',NOW(),"+getcharid(3)+")");
    	}
    	dispbottom "Rugby is not for everyone!";
    	end;
    

     

    Did that and still this error persist :

    : DB error - Duplicate entry 'ifp7bhe3ck' for key 'PRIMARY'

    [Debug]: at script.c:15156 - INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('ifp7bhe3ck',NOW(),2000045)

    [Debug]: Source (NPC): promoclaim (invisible/not on a map)

    + Some characters Can still get multiple items some cannot

  8. //===== Custom Script ========================================
    //= Promotional Codes
    //===== By: ==================================================
    //= Arzzzae
    //= Rewritten by Peopleperson49 @ version 1.1.
    //===== Current Version: =====================================
    //= 1.8
    //===== Compatible With: =====================================
    //= Latest svn
    //===== Description: ========================================= 
    //= Allows GM's to setup promocodes ingame for players.
    //===== Additional Comments: ================================= 
    //= 1.0 Initial Release by Arzzzae.
    //= 1.1 Modified it to allow any length code.
    //= 1.2 Added option to choose whether its works any multiple
    //=	accounts or one time use only. Added allow_multiple
    //=	column to reward_codes table.
    //= 1.3 Added option to generate random 10 character/number
    //=	code.
    //= 1.4 Changed the bindatcmd command to @promocode instead of
    //=	@claim and @codesetup instead of @code.
    //= 1.5 Cleaned up the menus to flow better and eliminate
    //=	unnessary text.
    //= 1.6 Change a lot of the dispbottom to mes.
    //= 1.7 Added whether the code allows multiple to the view
    //=	existing promocodes.
    //= 1.8 Added sql tables to bottom of document.
    //============================================================
    -	script	promoclaim	-1,{
    
    OnInit:
    bindatcmd "promocode",strnpcinfo(3)+"::OnClaim";
    bindatcmd "codesetup",strnpcinfo(3)+"::OnEditCode",99,0;
    end;
    
    OnClaim:
    mes "^FF0000 Enter your promotional code.";
    input .@pc$;
    close2;
    if(query_sql("SELECT nameid,amount FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'",.@item,.@amt)==0) { dispbottom "Invalid promotional code."; end; }
    if(query_logsql("SELECT code,account_id FROM `rewardlogs` WHERE `code`='"+escape_sql(.@pc$)+"' AND `account_id`='"+getcharid(3)+"'")) { dispbottom "You already claimed this promotional code."; end; }
    else if(query_logsql("SELECT code,allow_multiple FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"' AND `allow_multiple`='1'")) {
    	getitem .@item,.@amt;
    	dispbottom "Promotional code successfully redeemed."; 
    	query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'", .@pcode_exists);
    	if(.@pcode_exists) { query_sql ("DELETE FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'"); end; } else { dispbottom "Promotional code not found."; }
    	end;
    }
    else if(query_logsql("SELECT code,allow_multiple FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"' AND `allow_multiple`='0'")) { 
    	getitem .@item,.@amt; dispbottom "Promotional code successfully redeemed.";
    	query_logsql("INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('"+.@pc$+"',NOW(),"+getcharid(3)+")");
    	end;
    }
    dispbottom "Rugby is not for everyone!";
    end;
    
    OnEditCode:
    switch(prompt("Create random promocode.:Create custom promocode.:View existing promocodes.:Delete existing promocodes.")) {
    case 1:
    	setarray .@RandomChar$[1],"a","b","c","d","e","f","g","h","i","j","k","m","n","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9";
    	set .@CharPick1$,.@RandomChar$[rand(1,33)];
    	set .@CharPick2$,.@RandomChar$[rand(1,33)];
    	set .@CharPick3$,.@RandomChar$[rand(1,33)];
    	set .@CharPick4$,.@RandomChar$[rand(1,33)];
    	set .@CharPick5$,.@RandomChar$[rand(1,33)];
    	set .@CharPick6$,.@RandomChar$[rand(1,33)];
    	set .@CharPick7$,.@RandomChar$[rand(1,33)];
    	set .@CharPick8$,.@RandomChar$[rand(1,33)];
    	set .@CharPick9$,.@RandomChar$[rand(1,33)];
    	set .@CharPick10$,.@RandomChar$[rand(1,33)];
    	set .@pcode$,""+.@CharPick1$+""+.@CharPick2$+""+.@CharPick3$+""+.@CharPick4$+""+.@CharPick5$+""+.@CharPick6$+""+.@CharPick7$+""+.@CharPick8$+""+.@CharPick9$+""+.@CharPick10$+"";
    	mes "The computer has generated a random promotional code of: ^0000FF"+.@pcode$+"^000000";
    	next;
    	query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@pcode$)+"'", .@pcode_exists);
    	if(.@pcode_exists) { mes "Sorry, that code already exist."; close; }
    	mes "The computer has generated ^FF0000"+.@pcode$+"^000000 as the promocode.";
    	mes " ";
    	mes " ";
    	mes "Please set a reward for the player who has entered the code.";
    	input .@reward;
    	next;
    	if(.@reward==0) { mes "Sorry, that is an invalid item id."; close; }
    	set .@iname$,getitemname(.@reward);
    	mes "How many ^FF0000"+.@iname$+"s^000000 would you like to give?";
    	input .@amount;
    	if(.@amount==0) { next; mes "Sorry, that is an invalid amount number."; close; }
    	next;
    	mes "Do you want this code to be usable on more than one account? Input ^FF00000^000000 to allow multiple or ^FF00001^000000 for single use.";
    	input .@multiple;
    	next;
    	mes "You have setup the prize to be:";
    	mes "^0000FF"+.@amount+"^000000 ^FF0000"+.@iname$+"^000000.";
    	if(.@multiple==0) { mes "It is setup to be useable on multiple accounts once."; } else { mes "It is setup to only be valid one time."; }
    	if(select("Yes:No, thanks")==2) { close; }
    	query_sql ("INSERT INTO `reward_codes` (code,nameid,item_name,amount,time_created,allow_multiple) VALUES ('"+.@pcode$+"', "+.@reward+", '"+.@iname$+"', "+.@amount+", NOW(),'"+.@multiple+"')");
    	dispbottom "Promotional Code ^FF0000"+.@pcode$+" ^000000is now activated and the reward is ^FF0000"+.@amount+" "+.@iname$+".";
    	end;
    case 2:
    	mes "Please specify what you would like the new code to be?";
    	input .@pcode$;
    	if(getstrlen(.@pcode$)<1) { mes "You must enter something."; close; }
    	next;
    	query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@pcode$)+"'", .@pcode_exists);
    	if(.@pcode_exists) { mes "Sorry, that code already exist."; close; }
    	mes "You have entered ^FF0000"+.@pcode$+"^000000 as the code.";
    	mes " ";
    	mes " ";
    	mes " ";
    	mes "Please set a reward for the player who has entered the code.";
    	input .@reward;
    	next;
    	if(.@reward==0) { mes "Sorry, that is an invalid item id."; close; }
    	set .@iname$,getitemname(.@reward);
    	mes "How many ^FF0000"+.@iname$+"s^000000 would you like to give?";
    	input .@amount;
    	if(.@amount==0) { next; mes "Sorry, that is an invalid amount number."; close; }
    	next;
    	mes "Do you want this code to be usable on more than one account? Input ^FF00000^000000 to allow multiple or ^FF00001^000000 for single use.";
    	input .@multiple;
    	next;
    	mes "You have setup the prize to be:";
    	mes "^0000FF"+.@amount+"^000000 ^FF0000"+.@iname$+"^000000.";
    	if(.@multiple==0) { mes "It is setup to be useable on multiple accounts once."; } else { mes "It is setup to only be valid one time."; }
    	if(select("Yes:No, thanks")==2) { close; }
    	query_sql ("INSERT INTO `reward_codes` (code,nameid,item_name,amount,time_created,allow_multiple) VALUES ('"+.@pcode$+"', "+.@reward+", '"+.@iname$+"', "+.@amount+", NOW(),'"+.@multiple+"')");
    	dispbottom "Promotional Code ^FF0000"+.@pcode$+" ^000000is now activated and the reward is ^FF0000"+.@amount+" "+.@iname$+".";
    	end;
    case 3:
    	set .@nb, query_sql("SELECT code, item_name, amount, allow_multiple amount FROM `reward_codes` ORDER BY time_created DESC LIMIT 100", .@code$, .@nid$, .@amount, .@allowmulti);	
    	if(.@nb==0) { dispbottom "No existing codes."; end; }
    	dispbottom "=============================================";
    	dispbottom "==============  EXISITING CODES  ==============";
    	dispbottom "=============================================";
    	for(set .@i,0; .@i < .@nb; set .@i,.@i+1) {
    	dispbottom ""+.@code$[.@i]+" (Reward: "+.@amount[.@i]+" "+.@nid$[.@i]+") ("+(.@allowmulti[.@i]==0?"Multiple account use.":"One time use only.")+")"; }
    	dispbottom "=============================================";
    	end;
    case 4:
    	input .@dcode$;
    	query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@dcode$)+"'", .@pcode_exists);
    	if(.@pcode_exists) {
    		mes "Would you like to delete that code?";
    		next;
    		if(select("Yes:No, thanks")==2) { close; }
    		query_sql ("DELETE FROM `reward_codes` WHERE `code`='"+escape_sql(.@dcode$)+"'");
    		mes "Promotional code successfully deleted.";
    		close;
    	}
    	dispbottom "Promotional code not found.";
    	end;
    case 255:
    	close;
    }
    }
    
    /*
    CREATE TABLE IF NOT EXISTS `reward_codes` (
      `code` varchar(10) NOT NULL DEFAULT '',
      `nameid` int(11) unsigned NOT NULL DEFAULT '0',
      `item_name` varchar(45) NOT NULL DEFAULT '',
      `amount` smallint(6) unsigned NOT NULL DEFAULT '0',
      `time_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `allow_multiple` int(11) NOT NULL,
      PRIMARY KEY (`code`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    CREATE TABLE IF NOT EXISTS `rewardlogs` (
      `code` varchar(10) NOT NULL DEFAULT '',
      `redeem_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
      `account_id` int(11) unsigned NOT NULL DEFAULT '0',
      PRIMARY KEY (`code`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    */
    

    This was the Edited version of Peoplesperson of the utility script "Promotional Code" at this topic http://rathena.org/board/topic/80676-utility-utility-promotional-codes/

    This maybe dead or too old but I think this is kinda useful:

    There are 2 Problems here :

    1. When you choose if the code can be used by multiple accounts.. -.- It literally can be used by the same account over and over and over again, my thoughts was it can be used by different accounts not by the same one more times than you can count

    2. Im having this errors on the map

     

    [Debug]: Source (NPC): promoclaim (invisible/not on a map)
    [Warning]: script:query_sql: Too many columns, discarding last 2 columns.
    [Debug]: Source (NPC): promoclaim (invisible/not on a map)
    [SQL]: DB error - Duplicate entry 'H6EfUa3jq4' for key 'PRIMARY'
    [Debug]: at script.c:15156 - INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('H6EfUa3jq4',NOW(),2000045)
    [Debug]: Source (NPC): promoclaim (invisible/not on a map)
    
    [Warning]: script:query_sql: Too many columns, discarding last 2 columns.
    [Debug]: Source (NPC): promoclaim (invisible/not on a map)
    [Warning]: script:query_sql: Too many columns, discarding last 2 columns.
    [Debug]: Source (NPC): promoclaim (invisible/not on a map)
    [Warning]: script:query_sql: Too many columns, discarding last 2 columns.
    [Debug]: Source (NPC): promoclaim (invisible/not on a map)
    

    It it anyway posible to be fixed?

  9. Im using Client date 2013-08-07

    in clientinfo.xml , I set it to langtype 0

    Diffed the Client , Only select login background , ticked the First and Second

    used http://rathena.sourceforge.net/tools/login_background/ to split the log in background into pieces and put it inside data/texture/유저인터페이스

    Used it in Grf Reading Client same as the Data Folder Reading Client both not working

    Problems :

    @mail = cannot click the send window. in the mail interface / tried using different lang types but flag emotixs are not working (Ctrl + 1 - 9) so I'd rather stick to langtype 0

    Login Background = it's literally not working.. the screen isn't going black..meaning the client doesn't read it.. Tried everything even put it inside login_interface folder.. still won't work

    Here is the name of the login background split files :

    t_배경1-1
    t_배경1-2
    t_배경1-3
    t_배경1-4

    Anyone who can shed any light about this problems? Appreciate it :D

  10. Just use put this at the end of your pvp warper script

     

    //Pvp Exit
    <Map>,<x>,<y>,<p>	script	ExitGate	406,{
    	warp	"<Map>",<x>,<y>;
    }
    

    edit <Map> ,<x>,<y>,<p>

    First <Map> for your Pvp Map and the second <Map> is from where you want them to go when they click the npc.
    <x>,<y> for your coordinates and <p> for the npc facing position

  11. No error on map server but it doesnt work

     

    //======Name========================================
    // Town Invasion
    //======Version=====================================
    // 2.1
    //======Author(s)===================================
    // Sandbox
    //======Comments====================================
    // Summons 2~5 MvP on a random town every 1~23hrs.
    // Those who killed the MvPs will receive a prize.
    //==================================================
    
    -	script	TownInvasion	-1,{
    
    OnClock0000
    OnCLock0300
    OnClock0600
    OnClock0900
    OnClock1200
    OnClock1500
    OnClock1800
    OnClock2100:
    	if(gettime(3) % 2 == 1 && !agitcheck() && !agitcheck2()) {
    
    		for(.@i = 0; .@i < 4; .@i++) { //Spawn on 4 towns
    			.Town_Invade$ = .Town$[rand(getarraysize(.Town$))];
    			announce .Town_Invade$+" Guard: Help us! Our town is being invaded!",bc_blue|bc_all;
    
    			for(.@ix = 0; .@ix < 5; .@ix++) { //MvP spawner
    				monster .Town_Invade$,0,0,"--ja--",.MvP[rand(getarraysize(.MvP))],1,strnpcinfo(1)+"::OnInvadeDeath";
    				}
    
    			for(.@iy = 0; .@iy < 100; .@iy++) { //Mob spawner
    				monster .Town_Invade$,0,0,"--ja--",-1,1,strnpcinfo(1)+"::OnMobsDeath";
    				}
    		}
    	}
    	end;
    
    OnInvadeDeath:
    	.@RandMvP = rand(getarraysize(.Prize));
    	getitem .Prize[.@RandMvP],.PAmt[.@RandMvP];
    	end;
    
    OnMobsDeath:
    	.@RandMob = rand(getarraysize(.Prize2));
    	getitem .Prize2[.@RandMob],.PAmt2[.@RandMob];
    	end;
    
    
    OnInit:
    	//Towns to Invade
    	setarray .Town$[0],"louyang","prontera","payon";
    
    	//MvPs to summon
    	setarray .MvP[0],2068,1785,1312;
    
    
    	//Prize to give MVP
    	setarray .Prize[0],674,6024,6187;
    	setarray .PAmt[0],3,1,150;
    
    	//Prize to give Mobs	
    	setarray .Prize2[0],6187;
    	setarray .PAmt2[0],150;
    	end;
    
    }
    

    Heree's what I did

  12.  

    Can you further modify the Script??

    Add a menu for how long the player will afk and use the @autotrade command (@afk) and log out..

    *They can choose how long and pay for a price.

    *Still the AFK zone will be enabled for online afk but offline afk on the other hand will have a little less reward.

    *After the time expires the character completely logs out

     

    Currently untested but yeah.

    prontera,100,100,5	script	hourlypoints	139,8,11,{
    end;
    
    OnTouch:
    	dispbottom "Stay here to get afk hourly points.";
    	attachnpctimer();
    	startnpctimer();
    	end;
        
    OnTimer3600000:
    	getmapxy(.@map$,.@x,.@y,0);
    	if( distance(.x,.y,.@x,.@y)<=11
    	&& .@map$==.map$ ) {
    		if( !@afk ) {
    			set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt;
    			dispbottom "You received "+.point_amt+" Kafrapoints by staying afk ingame for 1 hour";
    			dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
    			set @consecutive_hour, @consecutive_hour + 1;
    
    			if(@consecutive_hour == 3) {
    				set @consecutive_hour,0;
    				set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt;
    				dispbottom "You receive "+.cpoint_amt+" Kafrapoints in afking for 3 consecutive hours";
    				dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
    			}
    		} else if( @afk>=gettimetick(2) ) {
    			set #KAFRAPOINTS, #KAFRAPOINTS + .off_point_amt;
    			set @consecutive_hour, @consecutive_hour + 1;
    
    			if(@consecutive_hour == 3) {
    				set @consecutive_hour,0;
    				set #KAFRAPOINTS, #KAFRAPOINTS + .coff_point_amt;
    			}
    		} else {
    			stopnpctimer();
    			set(.@player$, strcharinfo(0));
    			detachrid;
    			atcommand "@kick \""+.@player$+"\"";
    			end;
    		}
    		attachnpctimer();
    		initnpctimer();
    	} else {
    		dispbottom "You left the afk area and will no longer receive Kafrapoints.";
    		stopnpctimer();
    	}
    	end;
    
    OnAFK:
    	set(@afk,1);
    	atcommand "@afk";
    	end;
    	
    OnInit:
    	getmapxy(.map$,.x,.y,1);
    	bindatcmd "afk","hourlypoints::OnAFK";
    	set .cpoint_amt, 50; //Points gained for consecutive time online.
    	set .point_amt, 10; //Normal points gained.
    	set .coff_point_amt, 10; //Points gained for consecutive time offline.
    	set .off_point_amt, 5; //Normal offline points gained.
    }
    
    prontera,0,0,5	script	Offline AFK	100,{
    	set .@npc$, strnpcinfo(1);
    	mes "["+.@npc$+"]";
    	mes "Would you like to activate offline afk?";
    	next;
    	if(select("Yes:No")==2) {
    		mes "["+.@npc$+"]";
    		mes "Alright, maybe next time.";
    		close;
    	}
    	mes "["+.@npc$+"]";
    	mes "Ok, how long would you like to afk offline?";
    	next;
    	set @menu, select(.menu$)-1;
    	if(Zeny>=.pric[@menu]) {
    		set(Zeny, Zeny-.pric[@menu]);
    		mes "["+.@npc$+"]";
    		mes "See you soon!";
    		close2;
    		set(@afk,gettimetick(2)+(.time[@menu]*60));
    		atcommand "@afk";
    	} else {
    		mes "["+.@npc$+"]";
    		mes "I'm sorry but it seems you don't have enough Zeny for that...";
    		close2;
    	}
    	end;
    
    OnInit:
    	function t {
    		function s;
    			set .@left, getarg(0);
    			if ( .@left <= 0 ) return getarg(0);
    			set .@day, .@left / 86400;
    			set .@hour, .@left % 86400 / 3600;
    			set .@min, .@left % 3600 / 60;
    			set .@sec, .@left % 60;
    			return ( ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) );
    		function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); }
    	}
    	setarray .time, 10,	30,	60,	120,	240,	480; //In minutes
    	setarray .pric, 1500,	4400,	8800,	17600	35300,	70000; //In Zeny
    	set .len, getarraysize(.time);
    	unitwarp 0,
    		getvariableofnpc(.map$,"hourlypoints"),
    		getvariableofnpc(.x,"hourlypoints"),
    		getvariableofnpc(.y,"hourlypoints")
    	;
    	for(set(.@a,0);.@a<.len;set(.@a,.@a+1))
    		set(.menu$,.menu$+t(.time[.@a]*60)+" for "+.pric[.@a]+" Zeny.:");
    }
    
    

    Variations ( shortcuts ) of the command @afk may be used to abuse this system for example @autotrade ( @at )...

     

    I recommend you add them after...

    bindatcmd "afk","hourlypoints::OnAFK";
    

    Like...

    bindatcmd "autotrade","hourlypoints::OnAFK";
    

    I've read some topics and the wiki and found out that binatcmdam disables a certain atcommand but I've tested it and removed the @afk command on the group.conf and because of bindatcmd "afk","hourlypoints::OnAFK"; they can still use the command, as last resort I removed bindatcmd "afk","hourlypoints::OnAFK"; on the script and now they can't use @afk

    But still im having a problem with @autotrade

    I referred to this topic : http://rathena.org/board/topic/70006-disable-specific-commands-in-a-map/

     

    and added this script 

     

    -	script	nocommand	-1,{
    OnInit:
    	bindatcmd("autotrade","nocommand::OnAtcommand");
    	end;
    OnAtcommand:
        if( strcharinfo(3) == "louyang" ) end;
        atcommand "@autotrade";
        end;
    

    but still they  can use the @autotrade command inside the afk zone.. can you further enlighten me :D.

    I just want to disable the @autotrade on my main town which is louyang. :D

  13. Hello rathena

    Gonna have a quick request for a Invasion event

    * No npc
    * You can add monster and edit the quantity
    * getitem per kill :D
    * Add / Edit map


    and A special prize for the one who killed the most monster + announce


    BUMP!

  14. @Capuche

    Lol ddn't understand that !!

    @Skorm

    Is it possible to restrict a certain map to use a specific @command since im only using it on 1 map i'll just restrict them from using @afk and @at(autotrade) in that map for certainty that they cannot abuse the script itself

  15.  

    Can you further modify the Script??

    Add a menu for how long the player will afk and use the @autotrade command (@afk) and log out..

    *They can choose how long and pay for a price.

    *Still the AFK zone will be enabled for online afk but offline afk on the other hand will have a little less reward.

    *After the time expires the character completely logs out

     

    Currently untested but yeah.

    prontera,100,100,5	script	hourlypoints	139,8,11,{
    end;
    
    OnTouch:
    	dispbottom "Stay here to get afk hourly points.";
    	attachnpctimer();
    	startnpctimer();
    	end;
        
    OnTimer3600000:
    	getmapxy(.@map$,.@x,.@y,0);
    	if( distance(.x,.y,.@x,.@y)<=11
    	&& .@map$==.map$ ) {
    		if( !@afk ) {
    			set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt;
    			dispbottom "You received "+.point_amt+" Kafrapoints by staying afk ingame for 1 hour";
    			dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
    			set @consecutive_hour, @consecutive_hour + 1;
    
    			if(@consecutive_hour == 3) {
    				set @consecutive_hour,0;
    				set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt;
    				dispbottom "You receive "+.cpoint_amt+" Kafrapoints in afking for 3 consecutive hours";
    				dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
    			}
    		} else if( @afk>=gettimetick(2) ) {
    			set #KAFRAPOINTS, #KAFRAPOINTS + .off_point_amt;
    			set @consecutive_hour, @consecutive_hour + 1;
    
    			if(@consecutive_hour == 3) {
    				set @consecutive_hour,0;
    				set #KAFRAPOINTS, #KAFRAPOINTS + .coff_point_amt;
    			}
    		} else {
    			stopnpctimer();
    			set(.@player$, strcharinfo(0));
    			detachrid;
    			atcommand "@kick \""+.@player$+"\"";
    			end;
    		}
    		attachnpctimer();
    		initnpctimer();
    	} else {
    		dispbottom "You left the afk area and will no longer receive Kafrapoints.";
    		stopnpctimer();
    	}
    	end;
    
    OnAFK:
    	set(@afk,1);
    	atcommand "@afk";
    	end;
    	
    OnInit:
    	getmapxy(.map$,.x,.y,1);
    	bindatcmd "afk","hourlypoints::OnAFK";
    	set .cpoint_amt, 50; //Points gained for consecutive time online.
    	set .point_amt, 10; //Normal points gained.
    	set .coff_point_amt, 10; //Points gained for consecutive time offline.
    	set .off_point_amt, 5; //Normal offline points gained.
    }
    
    prontera,0,0,5	script	Offline AFK	100,{
    	set .@npc$, strnpcinfo(1);
    	mes "["+.@npc$+"]";
    	mes "Would you like to activate offline afk?";
    	next;
    	if(select("Yes:No")==2) {
    		mes "["+.@npc$+"]";
    		mes "Alright, maybe next time.";
    		close;
    	}
    	mes "["+.@npc$+"]";
    	mes "Ok, how long would you like to afk offline?";
    	next;
    	set @menu, select(.menu$)-1;
    	if(Zeny>=.pric[@menu]) {
    		set(Zeny, Zeny-.pric[@menu]);
    		mes "["+.@npc$+"]";
    		mes "See you soon!";
    		close2;
    		set(@afk,gettimetick(2)+(.time[@menu]*60));
    		atcommand "@afk";
    	} else {
    		mes "["+.@npc$+"]";
    		mes "I'm sorry but it seems you don't have enough Zeny for that...";
    		close2;
    	}
    	end;
    
    OnInit:
    	function t {
    		function s;
    			set .@left, getarg(0);
    			if ( .@left <= 0 ) return getarg(0);
    			set .@day, .@left / 86400;
    			set .@hour, .@left % 86400 / 3600;
    			set .@min, .@left % 3600 / 60;
    			set .@sec, .@left % 60;
    			return ( ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) );
    		function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); }
    	}
    	setarray .time, 10,	30,	60,	120,	240,	480; //In minutes
    	setarray .pric, 1500,	4400,	8800,	17600	35300,	70000; //In Zeny
    	set .len, getarraysize(.time);
    	unitwarp 0,
    		getvariableofnpc(.map$,"hourlypoints"),
    		getvariableofnpc(.x,"hourlypoints"),
    		getvariableofnpc(.y,"hourlypoints")
    	;
    	for(set(.@a,0);.@a<.len;set(.@a,.@a+1))
    		set(.menu$,.menu$+t(.time[.@a]*60)+" for "+.pric[.@a]+" Zeny.:");
    }
    
    

    Variations ( shortcuts ) of the command @afk may be used to abuse this system for example @autotrade ( @at )...

     

    I recommend you add them after...

    bindatcmd "afk","hourlypoints::OnAFK";
    

    Like...

    bindatcmd "autotrade","hourlypoints::OnAFK";
    

    Where should I add it?

×
×
  • Create New...