Jump to content

youtube

Members
  • Posts

    171
  • Joined

  • Last visited

Posts posted by youtube

  1. yea same but i think this script is divide to how many party member i want if i kill

    1514=20 cashpoints

    1511=30 cashpoints

    1548= 40 cashpoints

    1609 = 60 cashpoints

    then my party member same my Cashpoints 



    LETS SAY I KILL THIS 1609 ID MOB I GOT MY CASHPOINT IS 60 AND MY PARTY MEMBERS GOT 60CASHPOINTS EACH. NOT DIVIDED 

    SAME THE OTHER ID MOBS 1514 , 1511 ,1548

  2. good day biggrin.png


    can i request about cashpoint


     


    details


    one party name PARTYLIST 5members


    when i kill this mobs 1514 my partymembers got cashpoints20 all members


    same like my points and annouce the partyname kill this mobs


    and


    1609 i kill this mobs i got 50cashpoints and my party members and annouce the party members this party kill this mobs


    this details for mobs


    1514=20 cashpoints


    1511=30 cashpoints


    1548= 40 cashpoints


    1609 = 60 cashpoints

  3. //===== EinherjarRO Scripts ================================== 
    //= Daily Prize, OnPCLoginEvent
    //===== By: ================================================== 
    //= Stolao
    //===== Current Version: ===================================== 
    //= 1.48
    //===== Compatible With: ===================================== 
    //= rAthena SVN
    //===== Description: ========================================= 
    //= A reward system for players who play more frequently
    //===== Comments: ============================================
    //= Todo:
    //= Revamp Exp and Points System, its kinda meh
    //===== Additional Comments: =================================
    //= 1.00 Daily Prize
    //= 1.01 Fixed Typo
    //= 1.02 Removed unessisary calculation
    //= 1.03 Added a sleep2 for delayed reward
    //= 1.04 Added dispbottom
    //= 1.05 Made Clearer
    //= 1.06 Made Disbutton Dynamic
    //= 1.07 Added .RewardQnt for configable Reward Quantity
    //= 1.08 Fixed Typo
    //= 1.09 Seperated .ZMulti into .Mode and .ZMulti
    //= 1.0A Changed zeny formula for .Mode 0
    //= 1.0B Changed Variable Names, More detailed exsplanations
    //= 1.0C Fixed typo again lol
    //= 1.0D Added in .PointType$, can now configure zeny into any point types
    //= 1.0E Added LoginCount
    //= 1.0F Made LoginCount Customisable
    //= 1.10 Changed Variable Names, More detailed exsplanations
    //= 1.11 Added Wipe feature
    //= 1.12 Fixed bug, changed "close;" to "close2;"
    //= 1.13 Changed .LogCount to bitwise
    //= 1.14 Changed .wipe to a whisper event, per Euphys Suggestion
    //= 1.15 Changed Formatting of config, per Euphys Suggestion
    //= 1.16 Added Login Reward Countdown, on each login
    //= 1.17 Added .PointName$
    //= 1.18 Fixed Typo
    //= 1.19 Added Checkweight
    //= 1.1A Changed query_sql for $LOGINCOUNT to set
    //= 1.1B Fixed bug with #DRewardCon, arraysize compersison (Thanks AnnieRuru)
    //= 1.1C Added meathod for characters online for attachrid
    //= 1.1D Actually Fixed the 1.1B Bug
    //= 1.1F Changed zeny formula to remove .ZMulti from mode 0
    //= 1.20 Changed .Reminder to .Welcome
    //= 1.21 Fixed missing details in Welcome Message
    //= 1.22 Changed .Mode to be bitwise
    //= 1.23 Added Item enable disable to .Mode
    //= 1.24 Changed whisper to allow for player Whispers
    //= 1.25 Added "time" Whisper Command for players, Thanks arzzae for suggestion
    //= 1.26 Made Whisper commands configable
    //= 1.27 Made GmLvl for wipe Configable
    //= 1.28 Fixed "Points" bitwise
    //= 1.29 Added Exp to .Mode
    //= 1.2A Optimized Rewards Script a little
    //= 1.2B Bug Fix with Display message on reciving rewards
    //= 1.2C Optimize a little more
    //= 1.2D Added server xp rate to config
    //= 1.2F Re-added checkweight
    //= 1.30 Move Checkweight up higher in script, makes more since
    //= 1.31 Removed XP Dispbutton
    //= 1.32 Added Buffer
    //= 1.33 Made BUffer Toggle-able
    //= 1.34 Made Buffer Dynamic
    //= 1.35 Optimized Buffer a little
    //= 1.36 Made Buffer More Dynamic
    //= 1.37 Optimized Buffer a little more
    //= 1.38 Fixed a typo in "seem" was "see"
    //= 1.39 removed "typo" bindatcmds
    //= 1.3A Fixed bug with sc_, didnt support names had to switch to ids
    //= 1.3B Fixed bug in buff bonus (time and rate)
    //= 1.3C Revamped buffs to take only 1 variable (now can only be 32 buffs)
    //= 1.3D Made Day(s) dynamic
    //= 1.3E Removed "Time" reqirement from players to check there Next Login Bonus
    //= 1.3F Added an Else after checkweight
    //= 1.40 Fixed typo in .BuffInfo
    //= 1.41 Reorganized rewards script
    //= 1.42 changed .@i -> .@x in Option & 32 (bug report by rakuzas)
    //= 1.43 Removed Login Count related scripts, as its not really part of rewards system
    //= 1.44 Made @loginreward do whole script, instead of relogging,
    //= 1.45 Removed Disable/Enable for whole script (just remove npc)
    //= 1.46 Changed A few Description, for easier understanding
    //= 1.47 Move sleep2 up to prevent possible multi rewards bug
    //= 1.48 Deleted unnecessary line "if( #DRewardCon == 0 ) set #DRewardCon,1;"
    //===== Contact Ifo: =========================================
    //= [Stolao] 
    //= Email: [email protected]
    //============================================================
    -	script	LOGIN	-1,{
    OnWhisperGlobal:
    OnLoginCmnd:
    OnPCLoginEvent:
    	sleep2 1000+.Rest*60000;
    	set .@i,(gettime(7)*365*24)+(gettime(8)*24)+gettime(3);
    	set .@g,getarraysize(.Rewards);
    	if(.@i >= (#LastDailyReward + .MinWait)){
    		if(.@i < #LastDailyReward + .MaxWait){ set #DRewardCon,#DRewardCon+1;
    		 } else { set #DRewardCon,1; }
    		if(#DRewardCon*2 > .@g-1){ set .@p,.Rewards[.@g-2]; set .@q,.Rewards[.@g-1];
    		} else { set .@p,.Rewards[#DRewardCon*2-2];  set .@q,.Rewards[#DRewardCon*2-1]; }
    		if(.Mode&1&&.@p){ 
    			if(!checkweight(.@p,.@q)){ dispbottom "You seem to be oveweight, put some stuff away and relog to claim prize"; end;
    			} else { getitem .@p,.@q; dispbottom ""+.@q+" "+getitemname(.@p)+""; }
    		}
    		if(.Mode&2) set .@A,#DRewardCon*.ZMulti;
    		if(.Mode&8) set .@A,.@A+.@q;
    		if(.Mode&2||.Mode&8){  setd .PointType$,getd(.PointType$)+.@A; dispbottom ""+.@A+" "+.PointType$+""; }
    		if(.Mode&4){ set .@B,#DRewardCon*.XPMulti[0]; set .@C,#DRewardCon*.XPMulti[1]; }
    		if(.Mode&16){ set .@B,.@B+.@q; set .@C,.@C+.@q; }
    		if(.Mode&4||.Mode&16){ getexp .@B,.@C; }
    		if(.Mode&32){
    			for(set .@x,0; .@x < getarraysize(.BuffInfo); set .@x,.@x+4){
    				if(#DRewardCon % .BuffInfo[.@x+1] == 0) sc_start .BuffInfo[.@x], .BuffInfo[.@x+2]*60000, .BuffInfo[.@x+3];
    			}
    		}
    		dispbottom "You have collected your daily reward, for "+#DRewardCon+" day"+((DRewardCon>1)?"s":"")+" in a row.";
    		set #LastDailyReward,.@i;
    	} else { dispbottom "You have "+(#LastDailyReward + .MinWait-.@i)+" hours till your next reward"; }
    end;
    OnInit:
    // -----------------------------------------------------------
    //  Daily Reward
    // -----------------------------------------------------------
    
    	//To Enable @ Command '@LoginReward' unslash next lines
    	// * Needs extra commands for typos
    //	bindatcmd("loginreward"	,"LOGIN::OnLoginCmnd",0,99);
    
    	//Minimum Hours Between Collecting Daily Reward
    	//   Day: 22-24
    	//   Week: 168
    	set .MinWait,22;
    
    	//Hours Before Lose Consecutive Daily Rewar
    	//   Day: 48-50
    	//   Week: 336
    	set .MaxWait,50;
    
    	//Number of mins after logging before collecting prize
    	set .Rest,0;
    
    	//Type of Points/Zeny earned 
    	//   eg: CASHPOINTS, Zeny, LoginPoints
    	set .PointType$,"Zeny";
    
    	//Toggle 
    	//   1: Item | 2: "Points" from Multi | 4: Exp from Multi 
    	//   8: "Points" from Days with ItemID of 0 |16: Exp from Days with ItemID of 0
    	//   32: Gain Buffs Every X Consecutive Days logged in
    	// (a bit value, e.g. 3 = Items & Points from Multi)
    	set .Mode,1+2+4+8+16+32;
    
    	//Consecutive Day Points Multiplier
    	// * If players login longer than the last set day,
    	//   they will keep getting a larger Multiplier
    	set .ZMulti,100;
    
    	//Consecutive Day Exp Multiplier
    	//  <Base Exp>,<Job Exp>;
    	// * If players login longer than the last set day,
    	//   they will keep getting a larger Multiplier.
    	setarray .XPMulti,10,10;
    
    	// Consecutive Days Buff
    	// Each buff contains 4 variables (32 Total Max)
    	// <Type>,<Days>,<Duration>,<Rate>, // Buff 1
    	// <Type>,<Days>,<Duration>,<Rate>, // Buff 2
    	//   ...;
    	//
    	//  Example: 188,7,45,3
    	//    -Every 7th consecutive day logged in Player gains +3 Str for 45 mins
    	//
    	//  Type is 188, which references which SC_ to use, SC_INCSTR in this example
    	//     -For a full list of SC_ visit the db/const.txt
    	//  Days is days buff is applied, in this example 7, so every 7th day, 14,21,28....
    	//  Duration is buff duration is Minuits, in this example 45 mins
    	//  Rate is buff strength, in this example player gains 3 Str
    	setarray .BuffInfo	,188,7,45,3	// +3 Str for 45 Mins Every 7th Day
    				,189,7,45,3	// +3 Agi for 45 Mins Every 7th Day
    				,190,7,45,3	// +3 Vit for 45 Mins Every 7th Day
    				,191,7,45,3	// +3 Int for 45 Mins Every 7th Day
    				,192,7,45,3	// +3 Dex for 45 Mins Every 7th Day
    				,193,7,45,3	// +3 Luk for 45 Mins Every 7th Day
    				,194,4,45,25	// +25 Hit for 45 Mins Every 4th Day
    				,196,4,45,25	// +25 Flee for 45 Mins Every 4th Day
    				,198,10,60,10	// +10% Hp for 60 Mins Every 10th Day
    				,199,10,60,10	// +10% Sp for 60 Mins Every 10th Day
    				,200,13,30,10	// +10% Atk for 30 Mins Every 10th Day
    				,201,13,30,10	// +10% Matk for 30 Mins Every 10th Day
    				,257,9,120,50	// +50% Exp for 120 Mins Every 9th Day
    				,258,9,120,50;	// +50% Item Drops for 120 Mins Every 9th Day
    
    	// Daily Prize items (max 64 days):
    	//   <itemID>,<amount>, // Day 1
    	//   <itemID>,<amount>, // Day 2
    	//   ...;
    	// * If players login longer than the last set
    	//   day, they will keep getting the last prize.
    	setarray .Rewards[0],
    		512,1,		// Day 1
    		513,2,		// Day 2
    		514,3,		// Day 3
    		0,1000;		// Day 4
    end;
    }
    

    how to change the reward to cashpoint + 20

  4. //===== eAthena Script =======================================
    //= InGame Forum
    //===== By ===================================================
    //= llchrisll
    //===== Version ==============================================
    //= 1.0 - Script Made
    //===== Credits ==============================================
    //- goddameit for allowing me use his World Chat as example
    //  So that I understood it I wrote it by myself so I didn't really "Copy&Paste" it ;O
    //====== ToDo List ===========================================
    //= Adding a pool maybe ;I
    //
    //===== Compatible/Created/Tested With ======================================
    //= eAthena SQL 14434 Trunk
    //===== Description ==========================================
    //= This Script handles an InGame Board as you can call it.
    //  GM's can make announces and player's can post their comments to it.
    //  Or creating an pool. Maybe there will be a Chatroom-like Option too.
    //===== MySQL Entries =======================================
    /*
    DROP TABLE IF EXISTS `igb_anno`;
    CREATE TABLE  `igb_anno` (
      `anno_id` int(10) unsigned NOT NULL,
      `title` varchar(255) DEFAULT 'Creation Fail',
      `text` varchar(255) NOT NULL,
      `author` varchar(255) NOT NULL,
      `date` varchar(255) DEFAULT '0000-00-00 00:00:00',
      PRIMARY KEY (`anno_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
    DROP TABLE IF EXISTS `igb_com`;
    CREATE TABLE  `igb_com` (
      `anno_id` int(10) unsigned NOT NULL,
      `com_id` int(11) unsigned NOT NULL,
      `com_txt` varchar(255) NOT NULL DEFAULT 'Test Message',
      `author` varchar(255) NOT NULL DEFAULT 'None',
      `date` varchar(255) NOT NULL DEFAULT '0000-00-00 00:00:00',
      `approved` varchar(255) NOT NULL DEFAULT 'No'
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    */
    //=============================================
    -	script	ChatRoom	-1,{
    end;
    
    OnPCLogoutEvent:
    if(@b_chat) setd("$@igb_ch_"+@b_chat+"_ppl$["+@igb+"]"),"";
    end;
    
    OnWhisperGlobal:
    if(@b_chat) {
    	set .@mes$,strcharinfo(0);
    	set .@chat_txt$,"[Chat] ["+strcharinfo(0)+"]: "+@whispervar0$;
    	dispbottom .@chat_txt$;
    	for( set .@a,0; .@a < getarraysize(getd("$@igb_ch_"+@b_chat+"_ppl$")); set .@a,.@a + 1) {
    		if(.@mes$ != set(.t$,getd("$@igb_ch_"+@b_chat+"_ppl$["+.@a+"]")) && attachrid(getcharid(3,.t$))) {
    			dispbottom .@chat_txt$;
    			detachrid;
    		}
    	}
    
    } else { 
    	dispbottom "[Chat] [Manager]: You didn't join an Room yet."; 
    }
    end; 
    }
    
    prontera,100,100,0	script	Board Manager	100,{
    
    set .@n$,"[Board Manager]";
    set .gm_lvl,60;
    
    mes .@n$;
    mes "Hello "+ strcharinfo(0)+"!";
    query_sql "SHOW TABLES LIKE 'igb_anno'",@ch_IGB$;
    query_sql "SHOW TABLES LIKE 'igb_com'",@ch_IGB2$;
    if(@ch_IGB$[0] == "" || @ch_IGB2$[0] == "") {
    	mes "I'm sorry, but the Board has not be installed yet.";
    	close;
    }
    mes "How can I help you?";
    switch(select("- Join Chat Room (Testing first):- Board Access:- Leave")) {
    	
    	case 1:
    	next;
    	mes .@n$;
    	mes "How this works:";
    	mes "First you'll have to join an Chat Room, afterwards";
    	mes "you type into your WhisperBox \"NPC:ChatRoom\".";
    	mes "Then you type your message you want to post.";
    	next;
    	mes .@n$;
    	if(@b_chat) {
    		mes "You'll have to leave the old chat room first.";
    		mes "before you can join a new one.";
    		if(select("- Leave Chat Room:- Nothing") - 1) close;
    		setd("$@igb_ch_"+@b_chat+"_ppl$["+@igb+"]"),"";
    		set @igb,0;
    		set @b_chat,0;
    		next;
    		mes .@n$;
    	}		
    	mes "Now choose which Room you want to join:";
    	mes "The number in the curles = User Quantity.";
    	select("- #1 ("+getarraysize(getd("$@igb_ch_1_ppl$"))+")",
    			"- #2 ("+getarraysize(getd("$@igb_ch_2_ppl$"))+")",
    			"- #3 ("+getarraysize(getd("$@igb_ch_3_ppl$"))+")");
    	next;
    	mes .@n$;
    	if(getarraysize(getd("$@igb_ch_"+@menu+"_ppl$")) >= 128) {
    		mes "I'm sorry, this room is full already.";
    		close;
    	}
    	set @b_chat,@menu;
    	for( set .s,0; .s < 128; set .s,.s + 1) {
    		if(!@igb && getd("$@igb_ch_"+@b_chat+"_ppl$["+.s+"]") == "") {
    			setd("$@igb_ch_"+@b_chat+"_ppl$["+set(@igb,.s)+"]"),strcharinfo(0);
    		}
    	}
    	mes "You have joined Room #"+@b_chat+" and took the "+@igb+". Position which was the next free one.";
    	close;
    	
    	case 2:
    	next;
    	set @a_id,0;
    	deletearray @a_title$[0],128;
    	deletearray @a_aut$[0],128;
    	deletearray @a_date$[0],128;
    	mes .@n$;
    	query_sql "SELECT `anno_id` , `title` , `text` , `author` , `date` FROM `igb_anno` WHERE `anno_id` > '0'",@a_id,@a_title$,@a_txt$,@a_aut$,@a_date$;
    	mes "There "+( (@a_id != 1)?"are":"is")+" "+@a_id+" Announce(s).";
    	if(getgmlevel() > .gm_lvl) {
    		mes "Want to create one?";
    		if(select("Yes:No") == 1) goto F_CT;
    	}
    	if(!@a_id) goto F_Quit;
    	next;
    	mes .@n$;
    	mes "Info/Rules:";
    	mes "1.) Don't flame in this \"Forum\".";
    	mes "2.) Comments only related to the thread are allowed.";
    	mes "3.) There is a delay of 5 Minutes till the next comment.";
    	mes "4.) Double-comment will be prevented automatically.";
    	mes "More will be coming...";
    	next;
    	mes .@n$;
    	set @an_m$,"";
    	mes "Choose from the titles below.";
    	for( set @a,0; @a < getarraysize(@a_id); set @a,@a + 1) {
    		mes @a_id + ". "+@a_title$[@a];
    		mes "Created by: "+ @a_aut$[@a];
    		mes "On "+@a_date$[@a];
    		mes "==================";
    		set @an_m$,@an_m$ + "- "+(@a + 1)+".:";
    	}
    	set @an_m$,@an_m$ + "- Cancel";
    	if((prompt(@an_m$) - getarraysize(@a_id)) > 0) {
    		goto F_Quit;
    	} else {
    		next;
    		set @ap_m$,"";
    		set @cm_id,0;
    		set @ap,0;
    		set @b,@menu - 1;
    		mes .@n$;
    		mes "You have chosen";
    		mes @a_title$[@b];
    		mes "Is that correct?";
    		if(select("- Yes:- No") == 2) goto F_Quit;
    		next;
    		mes .@n$;
    		mes @a_txt$[@b];
    		mes " ";
    		mes "What now?";
    		// while(1) {
    		switch(select("- Create Comment:- Read Comments: "+ ( (getgmlevel() > .gm_lvl)?"- Unapproved Comments:- Delete Comments:":"") + "- Leave")) {
    			
    			case 1:
    			next;
    			mes .@n$;
    			if(getgmlevel() < .gm_lvl && (IGB_Delay > gettimetick(2))) {
    				mes "I'm sorry, but the comment delay is still active.";
    				mes "There are "+ (IGB_Delay - gettimetick(2))+" seconds left.";
    				close;
    			}
    			set IGB_Delay,0;
    			query_sql "SELECT `author` FROM `igb_com` WHERE `anno_id` = '"+@a_id[@b]+"'",@cm_aut$;
    			if(@cm_aut$[getarraysize(@cm_aut$) - 1] == strcharinfo(0)) {
    				mes "Double-Posting is not allowed.";
    				mes "Please wait till another player has posted";
    				mes "an comment.";
    				//continue;
    				goto F_Quit;
    			}
    			mes "Type now the comment please:";
    			mes "Maximum 200 letters.";
    			if(input(@an_cm$,1,200) != 0) {
    				mes "Invalid Entry.";
    				//continue;
    				goto F_Quit;
    			}
    			next;
    			mes .@n$;
    			mes "Following will be posted:";
    			mes " ";
    			mes @an_cm$;
    			if(select("- Confirm:- Leave") - 1) goto F_Quit;
    			//if(select("- Confirm:- Leave") - 1) continue;
    			next;
    			query_sql "SELECT `com_id` FROM `igb_com` WHERE `anno_id` = "+@a_id[@b],@cm_n;
    			query_sql "INSERT INTO `igb_com` ( `anno_id` , `com_id` , `com_txt` , `author` , `date` , `approved` ) VALUES ( '"+@a_id[@b]+"' , '"+(@cm_n + 1)+"' , '"+escape_sql(@an_cm$)+"' , '"+escape_sql(strcharinfo(0))+"' , '"+escape_sql(gettimestr("%Y-%m-%d %H:%M:%S",21))+"' , 'No')";
    			mes .@n$;
    			mes "Your comment has been saved.";
    			set IGB_Delay,gettimetick(2) + 300;
    			close;
    			
    			case 2:
    			next;
    			query_sql "SELECT `com_id` , `com_txt` , `author` , `date` FROM `igb_com` WHERE `anno_id` = '"+@a_id[@b]+"' AND `approved` = 'Yes'",@cm_id,@cm_txt$,@cm_aut$,@cm_date$;
    			mes .@n$;
    			if(@cm_id[0] != 0) {
    				for( set @a,0; @a < getarraysize(@cm_id); set @a,@a + 1) {
    					mes "Post No.: "+@cm_id[@a];
    					mes "----------------";
    					mes @cm_txt$[@a];
    					mes "----------------";
    					mes "On "+@cm_date$[@a];
    					mes "By "+@cm_aut$[@a];
    					mes "==================";
    					mes " ";
    				}
    			} else {
    				mes "There are no comments to be displayed.";
    				close;
    			}
    			break;
    			
    			case 3:
    			if(getgmlevel() < .gm_lvl) goto F_Quit;
    			next;
    			mes .@n$;
    			query_sql "SELECT `com_id` , `com_txt` , `author` , `date` FROM `igb_com` WHERE `anno_id` = '"+@a_id[@b]+"' AND `approved` = 'No' ORDER BY `com_id`",@cm_id,@cm_txt$,@cm_aut$,@cm_date$;
    			if(@cm_id[0] != 0) {
    				mes "Here is the list of the unapproved comments:";
    				next;
    				mes .@n$;
    				for( set @a,0; @a < getarraysize(@cm_id); set @a,@a + 1) {
    					mes " ";
    					mes "Post No.: "+@cm_id[@a];
    					mes "----------------";
    					mes @cm_txt$[@a];
    					mes "----------------";
    					mes "On "+@cm_date$[@a];
    					mes "By "+ @cm_aut$[@a];
    					mes "==================";
    					set @ap_m$,@ap_m$ + "- "+@cm_id[@a]+".:";
    				}
    				next;
    				select(@ap_m$);
    				set @ap,@menu - 1;
    				mes .@n$;
    				mes "You have chosen Post No. "+@cm_id[@ap]+",";
    				mes "what now?";
    				next;
    				switch(select("- Approve:- Delete:- Nothing")) {
    				
    					case 1:
    					mes .@n$;
    					mes "The Post No. "+@cm_id[@ap]+" has been succesfully approved.";
    					query_sql "UPDATE `igb_com` SET `approved` = 'Yes' WHERE `com_id` = '"+@cm_id[@ap]+"' AND `anno_id` = '"+@a_id[@b]+"'";
    					close;
    					
    					case 2:
    					mes .@n$;
    					mes "The Post No. "+@cm_id[@ap]+" has been succesfully deleted.";
    					query_sql "DELETE FROM `igb_com` WHERE `com_id` = '"+@cm_id[@ap]+"' AND `anno_id` = '"+@a_id[@b]+"'";
    					close;
    					
    					case 3:
    					goto F_Quit;
    					break;
    				}
    							
    			} else {
    				mes "There are no comments to be displayed.";
    				close;
    			}
    			break;
    			
    			case 4:
    			if(getgmlevel() < .gm_lvl) goto F_Quit;
    			next;
    			set @ap_m$,"";
    			mes .@n$;
    			query_sql "SELECT `com_id` , `com_txt` , `author` , `date` FROM `igb_com` WHERE `anno_id` = '"+@a_id[@b]+"' ORDER BY `com_id`",@cm_id,@cm_txt$,@cm_aut$,@cm_date$;
    			if(@cm_id[0] != 0) {
    				mes "Here is the list of the comments:";
    				next;
    				mes .@n$;
    				for( set @a,0; @a < getarraysize(@cm_id); set @a,@a + 1) {
    					mes " ";
    					mes "Post No.: "+@cm_id[@a];
    					mes "----------------";
    					mes @cm_txt$[@a];
    					mes "----------------";
    					mes "On "+@cm_date$[@a];
    					mes "By "+ @cm_aut$[@a];
    					mes "==================";
    					set @ap_m$,@ap_m$ + "- "+@cm_id[@a]+".:";
    				}
    				next;
    				select(@ap_m$);
    				set @ap,@menu - 1;
    				mes .@n$;
    				mes "You have chosen Post No. "+@cm_id[@ap]+",";
    				mes "what now?";
    				next;
    				switch(select("Delete:- Nothing")) {
    				
    					case 1:
    					mes .@n$;
    					mes "The Post No. "+@cm_id[@ap]+" has been succesfully deleted.";
    					query_sql "DELETE FROM `igb_com` WHERE `com_id` = '"+@cm_id[@ap]+"' AND `anno_id` = '"+@a_id[@b]+"'";
    					close;
    					
    					case 2:
    					goto F_Quit;
    					break;
    				}
    							
    			} else {
    				mes "There are no comments to be displayed.";
    				close;
    			}
    			break;
    			
    			case 5:
    			goto F_Quit;
    			break;
    		}
    	}
    	case 3:
    	goto F_Quit;
    	break;
    	
    	F_CT:
    	next;
    	set @an_date$,"";
    	set @an_author$,"";
    	set @anno_id,0;
    	set @anno_txt$,"";
    	set @anno_title$,"";
    	mes .@n$;
    	mes "What title should this announce have?";
    	mes "Note: Maximum 50 letters.";
    	mes "Type 'Cancel' for aborting.";
    	next;
    	if(input(@anno_title$,1,50) != 0 || @anno_title$ == "Cancel") {
    		mes .@n$;
    		mes "Invalid Title,";
    		mes "Maximum 50 letters.";
    		goto F_Quit;
    	}
    	mes .@n$;
    	mes "Now type the message you want.";
    	mes "Note: Maximum 200 letters.";
    	mes "Type 'Cancel' for aborting.";
    	next;
    	if(input(@anno_txt$,1,200) != 0 || @anno_txt$ == "Cancel") {
    		mes .@n$;
    		mes "Invalid Message,";
    		mes "Maximum 200 letters.";
    		goto F_Quit;
    	}
    	query_sql "SELECT `anno_id` FROM `igb_anno`",@a_id;
    	mes .@n$;
    	mes "Result:";
    	mes " ";
    	mes "Post No.: "+set(@anno_id,@a_id + 1);
    	mes "Title: "+@anno_title$;
    	mes "----------------";
    	mes @anno_txt$;
    	mes "----------------";
    	mes "On: "+ set(@an_date$,gettimestr("%Y-%m-%d %H:%M:%S",21));
    	mes "By: "+ set(@an_author$,strcharinfo(0));
    	mes "==================";
    	mes "Is that correct?";
    	if(select("- Yes:- No") - 1) goto F_Quit;
    	next;
    	mes .@n$;
    	mes "Your announce has been saved";
    	mes "and broadcasted on the server.";
    	close2;
    	query_sql "INSERT INTO `igb_anno` ( `anno_id` , `title` , `text` , `author` , `date`) VALUES ( '"+@anno_id+"' , '"+escape_sql(@anno_title$)+"' , '"+escape_sql(@anno_txt$)+"' , '"+escape_sql(@an_author$)+"' , '"+escape_sql(@an_date$)+"' )";
    	announce "New Announce added to the Board!!",0;
    	sleep2 2000;
    	announce "Post No.:"+@anno_id+" - Title: "+@anno_title$+" by "+@an_author$,0;
    	end;
    }
    
    F_Quit:
    next;
    mes .@n$;
    mes "See ya again.";
    close;
    
    
    }
    

    please help me 

    post-18119-0-27647300-1375350857_thumb.jpg

  5. //===== eAthena Script =======================================
    //= Security System
    //===== By ===================================================
    //= llchrisll
    //===== Version ==============================================
    //= 1.0 - Script Made
    //= 1.1 - Fixed SQL Bug (SQL Injection) - Thanks to ToastofDoom
    //= 2.0 - Shortened a bit and made it more dynamically
    //      - Removed OnWhisperGlobal
    //      - Renamed variables (always temp character variables ....)
    //      - Added prevention to use "ALT+M" shortcuts and dying via 
    //        Attacks like Mob or PvP Maps after Login until the security password has been put
    //===== Compatible With ======================================
    //= Every eAthena MySQL Version
    //===== Description ==========================================
    //= Security System - Simple
    //===== Comments =============================================
    //= None....
    //============================================================
    prontera.gat,150,180,4	script	Security Manager	109,{
    
    if (getgmlevel() >= 80) {
    	mes .n$;
    	mes "Which Menu?";
    	menu "- Player Menu",-,"- GM Menu",M_GM;
    	next;
    }
    	mes .n$;
    	mes "Hello, "+strcharinfo(0)+".";
    	mes "What do you wanna do?";
    	next;
    	switch(select("- Add/Change my Password:- Nothing")) {
    		
    	case 1:
    	if($security_pass == 0 && #security_pass == 1) {
    		set #security_pass, 0;
    		mes .n$;
    		mes "The System isn't enabled.";
    		close;
    		
    	} else if($security_pass == 0 && #security_pass == 0) {
    		mes .n$;
    		mes "The System isn't enabled.";
    		close;
    		
    	} else if($security_pass == 1 && #security_pass == 0) {
    		mes .n$;
    		mes "Hello, "+strcharinfo(0)+"";
    		mes "So you want to set your Password?";
    		next;
    		menu "- Yes, please.",-,"- Naa, not now.",N_now;
    
    		setit:
    		mes .n$;
    		// In case the database has not been cleaned before the script has been removed, extra check....
    		query_sql "SELECT `pass` FROM `security_sys` WHERE `account_id` = '"+getcharid(3)+"'",.@sec_pass$;
    		if(.@sec_pass$ != "") {
    			mes "It seems like that the database hasn't been cleared before removing the script.";
    			mes "I will use your password from before, which is "+.@sec_pass$+".";
    			set #security_pass,1;
    			close;
    		}
    		mes "Okay, type the password you want.";
    		input .@sec_pass$;
    		next;
    		mes .n$;
    		mes "The Password is:";
    		mes .@sec_pass$;
    		mes "Is that correct?";
    		next;
    		if(select("- Yes, it is:- No,repeat please") == 1) {
    			set #security_pass, 1;
    			callfunc "SS_PW",$@serv_mode,2,3,.@sec_pass$;
    			mes .n$;
    			mes "Thank you for your time.";
    			mes "Your Password and IP got saved.";
    			mes "Remember it carefully.";
    			close;
    		} else 
    			goto setit;
    
    		N_now:
    		next;
    		mes .n$;
    		mes "Okay, please come back as soon as possible.";
    		close;
    		
    	} else if($security_pass == 1 && #security_pass == 1) {
    		mes .n$;
    		mes "So you want to change";
    		mes "your Password?";
    		if(select("- Yes:- No") == 2) {
    			close;
    		} else {
    			next;
    			mes .n$;
    			mes "Please insert the new Password.";
    			mes "^FF2200 Note: Type \"Cancel\" into";
    			mes "the box to cancel your attempt.^000000";
    			input .@ch_pass$;
    			next;
    			mes .n$;
    			if(.@ch_pass$ == "Cancel") {
    				close;
    			} else if( callfunc("SS_PW",$@serv_mode,1,1,.@ch_pass$) == 1) {
    				mes "I'm sorry, but the new";
    				mes "Password matches the old";
    				mes "one.";
    				close;
    			}
    			
    			mes "The new password is:";
    			mes .@ch_pass$;
    			next;
    			mes .n$;
    			mes "Is that correct?";
    			if(select("- Yes, it is correct:- No, I don't want to change it.") == 2) {
    				next;
    				mes .n$;
    				mes "Okay, see you next time.";
    				close;
    				
    			}
    			next;
    			mes .n$;
    			mes "Thank you for your time.";
    			callfunc("SS_PW",$@serv_mode,2,1,.@ch_pass$);
    			close;
    		}
    	}
    
    	case 2:
    	close;
    	}
    
    M_GM:
    next;
    if($sec_table_created == 1) {
    	mes .n$;
    	mes "Hello, "+strcharinfo(0)+"!";
    	mes "What do you want to do?";
    	next;
    	switch(select("- Disable/Enable the System"+( ($@serv_mode == 1)?":- Delete Table":"")+":- Nothing") ) {
    			
    		case 1:
    		mes .n$;
    		mes "The Security System is " + ( ($security_pass) ? "^00BB22Enabled^000000." : "^FF2200Disabled^000000.");
    		if($security_pass == 0) {
    			mes "Wanna enable it?";
    			if(select("- Yes,please:- No,Thanks") == 2) {
    				next;
    				mes .n$;
    				mes "The Security System is still disabled.";
    				close; 
    				
    			} 
    			next;
    			mes .n$;
    			mes "The Security System is enabled now.";
    			announce "The Security Systen has been enabled.",bc_yellow|bc_all;
    			set $security_pass, 1;
    			close;
    			
    		} else if($security_pass == 1) {
    			mes "Wanna disable it?";
    			if(select("- Yes,please:- No,Thanks") == 2) {
    				next;
    				mes .n$;
    				mes "The Security System is still enabled.";
    				close;
    			}
    			next;
    			mes .n$;
    			mes "The Security system is disabled now.";
    			announce "The Security Systen has been disabled.",bc_yellow|bc_all;
    			set $security_pass, 0;
    			close;
    		}
    
    		case 2:
    		if($@serv_mode == 0) close;
    		mes .n$;
    		mes "Do you really want to delete the whole table?";
    		switch(select("- Yes, I want!!:- Noooo, I misclicked ya o_O")) {
    
    			case 1:
    			next;
    			mes .n$;
    			mes "Okay, it's a 'One-Way Ticket'!!!!";
    			query_sql "DROP TABLE `security_sys`";
    			set $sec_table_created,0;
    			set $security_pass,0;
    			close;
    
    			case 2:
    			next;
    			mes .n$;
    			mes "Okay, No Problem.";
    			close;
    		}
    
    		case 3:
    		next;
    		mes .n$;
    		mes "Goodbye, see ya next time.";
    		close;
    	}
    	
    } else {
    	mes .n$;
    	mes "There isn't a table in your database yet.";
    	mes "Want to create?";
    	next;
    	if(select("- Yes, I want to create one:- No, don't wanna") == 1) {
    		mes .n$;
    		mes "The Table is created now.";
    		query_sql "CREATE TABLE IF NOT EXISTS `security_sys` ( `last_ip` VARCHAR( 100 ) , `account_id` INT( 11 ) , `pass` VARCHAR( 32 ))";
    		set $sec_table_created, 1;
    		set $security_pass, 1;
    		close;
    	}
    	mes .n$;
    	mes "The table wasn't created.";
    	close;
    }
    
    OnInit:
    set .n$,"[Security Manager]";
    //======= Server Mode =======
    //- 0 > TxT
    //- 1 > SQL
    set $@serv_mode,0;
    
    if($@serv_mode == 0) // If Server Mode is TXT, set this to 1.
    	set $sec_table_created,1;
    end;
    }
    
    -	script	SS_PW_Login	-1,{
    end;
    
    OnPCLoginEvent:
    set .@n$,"[Security Manager]";
    // Server Name
    set .@serv_name$,"<Server Name>";
    // Mail Address
    set .@serv_mail$,"<Server Mail Address>";
    // ========== System is offline =======
    if($security_pass == 0) {
    	// Either Password has not been set or the system was temporarly down
    	if(#security_pass == 0 || #security_pass == 3) end;
    	// Password is set but system offline
    	else if(#security_pass == 1) { 
    		announce "The Security System is momentally offline.",bc_red|bc_self;
    		set #security_pass,3;
    	// System Offline but Jail active	
    	} else if(#security_pass == 2) 
    		set #security_pass,0;
    
    // ============= System is online =============
    } else if($security_pass == 1) {
    	// Checking if the Server Mode has been changed:
    	if(#sec_info != $@serv_mode) {
    		announce .@n$+": Seems like the Server Mode has been changed....",bc_red|bc_self;
    		set .@pw$,callfunc("SS_PW",$@serv_mode,1,1,"mode");
    		if( .@pw$ == "-2") // Checking for available password
    			set #security_pass,0;
    			
    		// I know this is unsecure, but until the I make an Password Recovery function (somewhere in the future q.q), it should be enough
    		else announce .@n$+": It seems like you got an password for this mode already, which is \""+.@pw$+"\".",bc_blue|bc_self;
    		set #sec_info,$@serv_mode;
    	}
    	// No Password set yet
    	if(#security_pass == 0) {
    		mes .@n$;
    		mes "Your Security Password hasn't been set yet.";
    		mes "Please come to me and set it.";
    		close;
    	
    	// Jail.....
    	} else if(#security_pass == 2) 
    		goto W_Jail;
    	
    	// System was temporarly offline
    	else if(#security_pass == 3) {
    		announce "The Security System is back online.",bc_red|bc_self;
    		set #security_pass,1;
    		
    	// Password was set
    	} else if(#security_pass == 1) { // Check if Password was set
    		if( callfunc("SS_PW",$@serv_mode,1,2) == 1) goto PW_PASS; // IP Check (SQL Only)
    		
    		sc_start 112,999999,1; //Berserk State, not able to talk/using commands
    		pcblockmove getcharid(3),1; // Preventing from moving
    		atcommand "@battleignore"; // Preventing the player from dying from attacks
    		set @lock,1;
    		
    		mes .@n$;
    		mes "Please insert the Password for your own Security.";
    		next;
    		input .@pass$;
    		if( callfunc("SS_PW",$@serv_mode,1,1,.@pass$) == 1) goto PW_PASS; // Inserted Password Check
    		mes .@n$;
    		mes "The Password you typed is wrong.";
    		mes "You got one more chance to login.";
    		next;
    		input .@pass$;
    		if( callfunc("SS_PW",$@serv_mode,1,1,.@pass$) == 1 ) goto PW_PASS;
    		mes .@n$;
    		mes "You typed the Password wrong twice.";
    		mes "You will be warped to the Jail now.";
    		mes "After Login in, you have to write the password again and if you are write it";
    		mes "again wrong your account will be blocked.";
    		close2;
    		atcommand "@jail "+strcharinfo(0);
    		set #security_pass,2;
    		sc_end 112;
    		pcblockmove getcharid(3),0;
    		atcommand "@battleignore";
    		set @lock,0;
    		sleep2 1500;
    		atcommand "@kick "+strcharinfo(0);
    	}
    }
    end;
    
    // Password Input Passed
    PW_PASS:
    mes .@n$;
    mes "You have successfully logged in. Have Fun on "+.@serv_name$+".";
    close2;
    // Checking if the player has a different IP then before and update it accordingly.
    if(@ip_n) {
    	callfunc("SS_PW",$@serv_mode,2,2,@ip_new$);
    	set @ip_n,0;
    	set @ip_new$,"";
    }
    if(@lock) {
    	sc_end 112;
    	pcblockmove getcharid(3),0;
    	atcommand "@battleignore";
    	percentheal 100,100;
    	set @lock,0;
    }
    end;
    	
    W_Jail:
    sc_start 112,999999,1; //Berserk State, not able to talk/using commands
    pcblockmove getcharid(3),1; // Preventing from moving
    
    mes .@n$;
    mes "Please type the 'correct' Password now or your account will be blocked";
    mes "and you have to write an e-mail to \""+.@serv_mail$+"\" with the content of the right Password.";
    next;
    mes .@n$;
    mes "Example:";
    mes "Subject: Security System - Account Unblock";
    mes "Text: Account Name: *x*";
    mes "      Password:     *x*";
    next;
    mes .@n$;
    mes "Start please:";
    next;
    input .@pass$;
    if( callfunc("SS_PW",$@serv_mode,1,1,.@pass$) == 1 ) {
    	set #security_pass,1;
    	sc_end 112;
    	pcblockmove getcharid(3),0;
    	percentheal 100,100;
    	atcommand "@unjail "+strcharinfo(0);
    	goto PW_PASS;
    }
    mes .@n$;
    mes "The Password you typed is wrong.";
    mes "Your Account will be blocked now.";
    close2;
    atcommand "@block "+strcharinfo(0);
    end;
    }
    
    function	script	SS_PW	{
    // getarg(0) == Server Mode
    // getarg(1) == Data Type
    //   - 1= Read
    //   - 2= Write
    // getarg(2) == Read/Write Type
    //   - 1=PW
    //   - 2=IP (SQL only)
    //   - 3=New Entry
    // getarg(3) == Data Value
    switch(getarg(2)) {
    	case 1: 
    	if(getarg(0) == 1) { // SQL Mode
    		if(getarg(1) == 1) { // Data Type - Read
    			query_sql "SELECT `pass` FROM `security_sys` WHERE `account_id` = '"+getcharid(3)+"'",.@sec_pass$;
    			if(getarg(3) == .@sec_pass$) return 1;
    			else if(getarg(3) == "mode") 
    				if(.@sec_pass$ == "") return -2;
    				else return .@sec_pass$;
    			else return -1;
    		
    		} else if(getarg(1) == 2) // Data Type - Write
    			query_sql "UPDATE `security_sys` SET `pass` = '"+escape_sql(getarg(3))+"' WHERE `account_id` = '"+getcharid(3)+"'";
    		
    		return;
    		
    	} else if(getarg(0) == 0) { // TXT Mode
    		if(getarg(1) == 1)  // Data Type - Read
    			if(getarg(3) == #sec_pass$) return 1;
    			else if(getarg(3) == "mode") 
    				if(#sec_pass$ == "") return -2;
    				else return #sec_pass$;
    			else return -1;
    		else if(getarg(1) == 2) // Data Type - Write
    			set #sec_pass$,getarg(3);
    		
    		return;
    	}
    	
    	case 2:
    	// Checking if the server mode is SQL and checks the IP's afterwards
    	if(getarg(0) == 0) return 1;
    	if(getarg(1) == 1) { // Data Type - Read
    		query_sql "SELECT `last_ip` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'",.@last_ip$;
    		query_sql "SELECT `last_ip` FROM `security_sys` WHERE `account_id` = '"+getcharid(3)+"'",.@last_ip2$;
    		if(.@last_ip$ == .@last_ip2$) return 1;
    		else { 
    			set @ip_n,1; // Got new IP > Update after Password Check passed
    			set @ip_new$,.@last_ip$; // IP Itself
    			return -1;
    		}
    		
    	} else if(getarg(1) == 2) // Data Type - Write
    		query_sql "UPDATE `security_sys` SET `last_ip` = '"+getarg(3)+"' WHERE `account_id` = '"+getcharid(3)+"'";
    	
    	case 3:
    	if(getarg(0) == 1) { // SQL Mode
    		query_sql "SELECT `last_ip` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'",.@last_ip$;
    		query_sql "INSERT INTO `security_sys` (`last_ip` , `account_id` , `pass`) VALUES ('"+.@last_ip$+"' , '"+getcharid(3)+"' , '"+escape_sql(getarg(3))+"')";
    	
    	} else if(getarg(0) == 0) // TXT Mode
    		set #sec_pass$,getarg(3);
    		
    	return;
    }
    }
    

    please help me this

    post-18119-0-93204400-1375349362_thumb.jpg

×
×
  • Create New...