Jump to content

Patskie

Community Contributors
  • Content Count

    366
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by Patskie


  1.  

    I remember someone did it however it can be done on windows OS only? Hmm. I don't quite remember. And also, i think this can't be done through script alone.

    This can be done without source too, scirpy stores all things in SQL, php checks SQL regularly, and emails, else by using functions in c(source) to send email

    That's exactly what i think literally. :P

     

    SCRIPT -> SQL <- PHP -> E-MAIL


  2. malaya,301,62,0	script	School of Fish#1	844,{if (countitem(632) == 0) goto L_Tidak;	if (isequipped(2764)) && (isequipped(2775)){		specialeffect2 EF_BUBBLE;		set .@fcast,10;		if (isequipped(2550)) { //Fisher's_Muffler			set .@fcast,.@fcast - 3;		}		if (isequipped(2443)) { //Fish_Shoes			set .@fcast,.@fcast - 2;		}		delitem 632,1;		progressbar "ffffff",.@fcast;			if (rand(1,100) == 1) {				getitem 5403,1;				specialeffect EF_BUBBLE;				announce strcharinfo(0) + " Mendapatkan Ikan !!!",0,"0xff77ff";				end;			}		set .@rhea_ran,rand(1,9);		if (.@rhea_ran == 1) {			getitem 756,5;		}		else if (.@rhea_ran == 2) {			getitem 757,5;		}		else if (.@rhea_ran == 3) {			getitem 984,3;		}		else if (.@rhea_ran == 4) {			getitem 12411,1;		}		else if (.@rhea_ran == 5) {			getitem 12257,3;		}		else if (.@rhea_ran == 6) {			getitem 607,3;		}		else if (.@rhea_ran == 7) {			getitem 984,3;		}		else if (.@rhea_ran == 8) {			getitem 985,3;		}		else {			dispbottom "Tidak Mendapatkan apa-apa.";			close;		}		if (rand(1,500) == 1) {			getitem 7960,1,"announce";		}		if (rand(1,600) == 1) {			getitem 12103,1; //Old_Blue_Box			announce strcharinfo(0) + " Mendapatkan Bloody Dead Branch !!",0,"0x00ffff";		}		if (rand(1,600) == 1) {			getitem 7272,1; //RBD			announce strcharinfo(0) + " Mendapatkan Rice Ball Doll !!",0,"0x00ffff";		}		if (rand(1,500) == 1) {			getitem 12214,1; //Old_Blue_Box			announce strcharinfo(0) + " Mendapatkan Convex Mirror !!",0,"0x00ffff";		}		if (rand(1,500) == 1) {			getitem 5317,1; //Old_Blue_Box			announce strcharinfo(0) + " Mendapatkan Fisherman Hat !!",0,"0x00ffff";		}		if (rand(1,50) == 1) {			atcommand "@battleignore";			setoption 0x2,1;			sc_start sc_berserk, 1000000000, 1;			mes "[Fantastic Anti Bot]";			mes "Bot checking time";			mes "Please input the number you see";			next;			switch( rand(1,9) ) {			case 1:				mes "#################^83F52C##^000000################";				mes "###############^83F52C####^000000################";				mes "#################^83F52C##^000000################";				mes "#################^83F52C##^000000################";				mes "#################^83F52C##^000000################";				mes "#################^83F52C##^000000################";				mes "###############^83F52C######^000000##############";				input @num;				if(@num == 1) break;				atcommand "@kick "+strcharinfo(0);				end;			case 2:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "###################^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####################";				mes "############^83F52C##^000000#####################";				mes "############^83F52C#########^000000##############";				input @num;				if(@num == 2) break;				atcommand "@kick "+strcharinfo(0);				end;			case 3:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "###################^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				mes "###################^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				input @num;				if(@num == 3) break;				atcommand "@kick "+strcharinfo(0);				end;			case 4:				mes "############^83F52C##^000000#####################";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "############^83F52C#########^000000##############";				mes "##################^83F52C##^000000###############";				mes "##################^83F52C##^000000###############";				input @num;				if(@num == 4) break;				atcommand "@kick "+strcharinfo(0);				end;			case 5:				mes "############^83F52C########^000000###############";				mes "############^83F52C##^000000#####################";				mes "############^83F52C##^000000#####################";				mes "############^83F52C#######^000000################";				mes "##################^83F52C##^000000###############";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "#############^83F52C######^000000################";				input @num;				if(@num == 5) break;				atcommand "@kick "+strcharinfo(0);				end;			case 6:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####################";				mes "############^83F52C########^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C######^000000################";				input @num;				if(@num == 6) break;				atcommand "@kick "+strcharinfo(0);				end;			case 7:				mes "############^83F52C########^000000###############";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "################^83F52C##^000000#################";				mes "###############^83F52C##^000000##################";				mes "###############^83F52C##^000000##################";				mes "###############^83F52C##^000000##################";				mes "###############^83F52C##^000000##################";				input @num;				if(@num == 7) break;				atcommand "@kick "+strcharinfo(0);				end;			case 8:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				input @num;				if(@num == 8) break;				atcommand "@kick "+strcharinfo(0);				end;			case 9:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C########^000000##############";				mes "###################^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				input @num;				if(@num == 9) break;				atcommand "@kick "+strcharinfo(0);				end;			}			next;			mes "[Anti Bot]";			mes "Thank you for your patience, you can now move on.";			atcommand "@battleignore";			setoption 0x2,0;			sc_end sc_berserk;			percentheal 100,100;			set @kill,0;			close;		}		end;	}	else {		mes "Kamu tidak mempunyai/memakai perlengkapan memancing !";		close;L_Tidak:mes "Kamu tidak mempunyai umpan untuk memancing !";close;	}}ayothaya,91,91,0	duplicate(School of Fish#1)	Click Here#01	844ayothaya,74,118,0	duplicate(School of Fish#1)	Click Here#02	844ayothaya,258,95,0	duplicate(School of Fish#1)	Click Here#03	844dewata,218,68,0	duplicate(School of Fish#1)	Click Here#04	844dewata,199,71,0	duplicate(School of Fish#1)	Click Here#05	844ayothaya,258,100,0	duplicate(School of Fish#1)	Click Here#06	844ayothaya,183,106,0	duplicate(School of Fish#1)	Click Here#07	844dewata,185,75,0	duplicate(School of Fish#1)	Click Here#08	844dewata,128,53,0	duplicate(School of Fish#1)	Click Here#09	844dewata,143,68,0	duplicate(School of Fish#1)	Click Here#10	844

  3. malaya,301,62,0	script	School of Fish#1	844,{if (countitem(632) == 0) goto L_Tidak;	if (isequipped(2764)) && (isequipped(2775)){		specialeffect2 EF_BUBBLE;		set .@fcast,10;		if (isequipped(2550)) { //Fisher's_Muffler			set .@fcast,.@fcast - 3;		}		if (isequipped(2443)) { //Fish_Shoes			set .@fcast,.@fcast - 2;		}		delitem 632,1;		progressbar "ffffff",.@fcast;			if (rand(1,100) == 1) {				getitem 5403,1;				specialeffect EF_BUBBLE;				announce strcharinfo(0) + " Mendapatkan Ikan !!!",0,"0xff77ff";				end;			}		set .@rhea_ran,rand(1,9);		if (.@rhea_ran == 1) {			getitem 756,5;		}		else if (.@rhea_ran == 2) {			getitem 757,5;		}		else if (.@rhea_ran == 3) {			getitem 984,3;		}		else if (.@rhea_ran == 4) {			getitem 12411,1;		}		else if (.@rhea_ran == 5) {			getitem 12257,3;		}		else if (.@rhea_ran == 6) {			getitem 607,3;		}		else if (.@rhea_ran == 7) {			getitem 984,3;		}		else if (.@rhea_ran == 8) {			getitem 985,3;		}		else {			dispbottom "Tidak Mendapatkan apa-apa.";			close;		}		if (rand(1,500) == 1) {			getitem 7960,1,"announce";		}		if (rand(1,600) == 1) {			getitem 12103,1; //Old_Blue_Box			announce strcharinfo(0) + " Mendapatkan Bloody Dead Branch !!",0,"0x00ffff";		}		if (rand(1,600) == 1) {			getitem 7272,1; //RBD			announce strcharinfo(0) + " Mendapatkan Rice Ball Doll !!",0,"0x00ffff";		}		if (rand(1,500) == 1) {			getitem 12214,1; //Old_Blue_Box			announce strcharinfo(0) + " Mendapatkan Convex Mirror !!",0,"0x00ffff";		}		if (rand(1,500) == 1) {			getitem 5317,1; //Old_Blue_Box			announce strcharinfo(0) + " Mendapatkan Fisherman Hat !!",0,"0x00ffff";		}		if (rand(1,50) == 1) {			atcommand "@battleignore";			setoption 0x2,1;			sc_start sc_berserk, 1000000000, 1;			mes "[Fantastic Anti Bot]";			mes "Bot checking time";			mes "Please input the number you see";			next;			switch( rand(1,9) ) {			case 1:				mes "#################^83F52C##^000000################";				mes "###############^83F52C####^000000################";				mes "#################^83F52C##^000000################";				mes "#################^83F52C##^000000################";				mes "#################^83F52C##^000000################";				mes "#################^83F52C##^000000################";				mes "###############^83F52C######^000000##############";				input @num;				if(@num == 1) break;				atcommand "@kick "+strcharinfo(0);				end;			case 2:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "###################^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####################";				mes "############^83F52C##^000000#####################";				mes "############^83F52C#########^000000##############";				input @num;				if(@num == 2) break;				atcommand "@kick "+strcharinfo(0);				end;			case 3:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "###################^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				mes "###################^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				input @num;				if(@num == 3) break;				atcommand "@kick "+strcharinfo(0);				end;			case 4:				mes "############^83F52C##^000000#####################";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "############^83F52C#########^000000##############";				mes "##################^83F52C##^000000###############";				mes "##################^83F52C##^000000###############";				input @num;				if(@num == 4) break;				atcommand "@kick "+strcharinfo(0);				end;			case 5:				mes "############^83F52C########^000000###############";				mes "############^83F52C##^000000#####################";				mes "############^83F52C##^000000#####################";				mes "############^83F52C#######^000000################";				mes "##################^83F52C##^000000###############";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "#############^83F52C######^000000################";				input @num;				if(@num == 5) break;				atcommand "@kick "+strcharinfo(0);				end;			case 6:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####################";				mes "############^83F52C########^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C######^000000################";				input @num;				if(@num == 6) break;				atcommand "@kick "+strcharinfo(0);				end;			case 7:				mes "############^83F52C########^000000###############";				mes "############^83F52C##^000000####^83F52C##^000000###############";				mes "################^83F52C##^000000#################";				mes "###############^83F52C##^000000##################";				mes "###############^83F52C##^000000##################";				mes "###############^83F52C##^000000##################";				mes "###############^83F52C##^000000##################";				input @num;				if(@num == 7) break;				atcommand "@kick "+strcharinfo(0);				end;			case 8:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				input @num;				if(@num == 8) break;				atcommand "@kick "+strcharinfo(0);				end;			case 9:				mes "#############^83F52C#######^000000###############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C########^000000##############";				mes "###################^83F52C##^000000##############";				mes "############^83F52C##^000000#####^83F52C##^000000##############";				mes "#############^83F52C#######^000000###############";				input @num;				if(@num == 9) break;				atcommand "@kick "+strcharinfo(0);				end;			}			next;			mes "[Anti Bot]";			mes "Thank you for your patience, you can now move on.";			atcommand "@battleignore";			setoption 0x2,0;			sc_end sc_berserk;			percentheal 100,100;			set @kill,0;			close;		}		end;	}	else {		mes "Kamu tidak mempunyai/memakai perlengkapan memancing !";		close;L_Tidak:mes "Kamu tidak mempunyai umpan untuk memancing !";close;	}}ayothaya,91,91,0	duplicate(School of Fish#1)	Click Here#01	844ayothaya,74,118,0	duplicate(School of Fish#1)	Click Here#02	844ayothaya,258,95,0	duplicate(School of Fish#1)	Click Here#03	844dewata,218,68,0	duplicate(School of Fish#1)	Click Here#04	844dewata,199,71,0	duplicate(School of Fish#1)	Click Here#05	844ayothaya,258,100,0	duplicate(School of Fish#1)	Click Here#06	844ayothaya,183,106,0	duplicate(School of Fish#1)	Click Here#07	844dewata,185,75,0	duplicate(School of Fish#1)	Click Here#08	844dewata,128,53,0	duplicate(School of Fish#1)	Click Here#09	844dewata,143,68,0	duplicate(School of Fish#1)	Click Here#10	844

  4. @Snaehild : Change : set .count, 0; to set .count, .count + 1;

     

    @DeviantRaze :

    setarray .Maps$[0],"izlude","geffen","morocc","prontera"; // Possible maps+ bindatcmd "itemshower", strnpcinfo( 3 ) + "::OnItemShower", 99, 99;...+ OnItemShower:OnMinute31:

  5. Change : 

    OnClock0000:OnClock0100:OnClock0200:OnClock0300:OnClock0400:OnClock0500:OnClock0600:OnClock0700:OnClock0800:OnClock0900:OnClock1000:OnClock1100:OnClock1200:OnClock1300:OnClock1400:OnClock1500:OnClock1600:OnClock1700:OnClock1800:OnClock1900:OnClock2000:OnClock2100:OnClock2200:

    to :

    OnMinute00:if ( gettime( 3 ) % 2 ) end;

  6. prontera,150,150,0	script	Thanatos Summoner	100,{	setarray .items[ 0 ], 512, 1; .delay = 1; // in minutes	if ( mobcount( strnpcinfo( 4 ), strnpcinfo( 1 ) + "::OnSummon" ) ) mes "Thanatos is here!";	else if ( gettimetick( 2 ) < #timer ) mes "Thanatos cannot be summoned this time";	else if ( countitem( .items[ 0 ] ) < .items[ 1 ] ) mes "You need " + .items[ 1 ] + "x " + getitemname( .items[ 0 ] ) + " in order to summon thanatos!";	else {		mes "Are you sure you want to summon thanatos? I will delete the item requirement in order to summon him.";		next;		if ( select( "Yes:No" ) - 1 ) close;		delitem .items[ 0 ], .items[ 1 ];		monster strnpcinfo( 4 ), 0, 0, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon";	}	close;	OnSummon: #timer = gettimetick( 2 ) + ( .delay * 60 ); end;} 

  7. Plano kong gumawa ng server pero ang sweldo ko ay sapat lang na pang buhay sa sarili ko dahil ayaw ko na humingi sa magulang ko :P. I need a sponsor yung sponsor na may kakayahan mag fund sa server. Wag niyo ko i message kung ang balak niyo lang eh tumanggap ng donation at isarado ang server after 1 to 3 months. Sagot ko mga ideas natin. Gawin nating maganda ang server na yan! :D feel free to contact me through the following :

     

    Skype : awesomeskie

    Facebook : https://www.facebook.com/pats.pogi

     

    or message me through this community.


  8. Change :
    OnPCKillEvent:    if( strcharinfo(3)!=.map$ ) end;    pk_points++;    dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s).";    end;

    To :

    OnPCKillEvent:	if ( strcharinfo( 3 ) != .map$ || killedrid == last_killed ) end;	last_killed = killedrid;	pk_points++;	dispbottom "You've gained one point! Your total is ["+pk_points+"] PK point(s).";	end;

  9. I don't know if i am getting this topic correct. Do you want a one-on-one bet npc or what?

     

    @GmOcean : I think you should register all those people who bet their items. In your script, anyone who won the event regardless if he bet an item or not can win. If that is the case and if i am in the perspective of the player i wouldn't bet my item for i can also win even i do not place one.

     

    Let me try my version. I made it more dynamic : 

    prontera,150,150,0	script	Bet NPC	100,{	if ( .player1 && .player2 && getcharid( 3 ) != .player1 && getcharid( 3 ) != .player2 ) {		/*			 - Player 1 and Player 2 are set			 - This should not be triggered to those people who bet their items			   otherwise they cannot claim their items if ever they win		*/		mes .npc$;		mes "Bet NPC is full";		close;	}	mes .npc$;	mes "Hello " + strcharinfo( 0 ) + ". What can i do for you?";	next;	switch( select( ( .player1 && .player2 ? "" : "Bet an item" ) + ":" + ( .player1 && .player2 ? "Claim Reward" : "" ) + ":Exit" ) ) {		case 1:				 if ( .player1 ) {					/* Check if the first person who bet is other person or not. If not, then we terminate the script */					if ( .player1 == getcharid( 3 ) ) {						mes .npc$;						mes "Doing this is not good";						break;					}					mes .npc$;					mes "^FF0000" + rid2name( .player1 ) + "^000000 placed " + .bet_amount + "x " + getitemname( .bet_item );					next;					mes .npc$;					mes "So? do you want to bet the tantamount item " + rid2name( .player1 ) + " placed?";					next;					if ( select( "Yes:No" ) - 1 ) break;					if ( countitem( .bet_item ) < .bet_amount ) {						mes .npc$;						mes "You don't have enough items to bet";						break;					}					delitem .bet_item, .bet_amount;					.player2 = getcharid( 3 );					announce rid2name( .player1 ) + " and " + rid2name( .player2 ) + " are fighting for " + .bet_amount + "x " + getitemname( .bet_item ),0;				} else {					 mes .npc$;					mes "What item do you want to bet?";					next;					getinventorylist;					for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {						.@menu$ += getitemname( @inventorylist_id[ .@i ] );						.@menu$ += ":";					}					.@s = select( .@menu$ ) - 1;					mes .npc$;					mes "How many ^FF0000" + getitemname( @inventorylist_id[ .@s ] ) + "^000000 will you bet?";					next;					 input .@amount;					if ( !.@amount ) {						mes .npc$;						mes "Invalid amount";						break;					}					if ( countitem( @inventorylist_id[ .@s ] ) < .@amount ) {						mes .npc$;						mes "You don't have " + .@amount + "x ^FF0000" + getitemname( @inventorylist_id[ .@s ] ) + "^000000";						break;					}					mes .npc$;					mes "Are you sure you want to bet " + .@amount + "x ^FF0000" + getitemname( @inventorylist_id[ .@s ] ) + "^000000?";					next;					if ( select( "Yes:No" ) - 1 ) break;					.bet_item = @inventorylist_id[ .@s ];					.bet_amount = .@amount;					delitem .bet_item, .bet_amount;					.player1 = getcharid( 3 );					announce rid2name( .player1 ) + " placed " + .bet_amount + "x " + getitemname( .bet_item ) + " on bet NPC", 0;				}				break;		case 2: if ( getcharid( 3 ) != $wid ) {					mes .npc$;					mes "You are not the winner of the bet";				} else {					/* Check if the winner id that is set is one of the people who bet. If not, reset the winner id */					if ( $wid == .player1 || $wid == .player2 ) {						getitem .bet_item, .bet_amount * 2;						announce rid2name( getcharid( 3 ) ) + " won the bet",0;						.bet_item = 0;						.bet_amount = 0;						.player1 = 0;						.player2 = 0;						$wid = 0;					} else {						mes .npc$;						mes "You are not registered on our npc";						$wid = 0;						announce rid2name( getcharid( 3 ) ) + " is not registered on our bet npc therefore the npc will reset the winner id",0;					}				}				break;		case 3:		default:			 break;	}	close;	OnInit:		.npc$ = "[ ^FF0000" + strnpcinfo( 1 ) + "^000000 ]";		end;}// prontera,153,153,0	script	Test	100,{ $wid = 0; $wid = getcharid( 3 ); end; } 

     

    Didn't fully test though because it is already 1:36 in the morning here in Philippines. I'm sleepy :D. Also, this is good for one-on-one betting game.


  10. prontera,150,150,0	script	Sample	100,{	mes .npc$;	mes "Hello " + strcharinfo( 0 ) + ". What can i do for you?";	next;	switch( select( implode( .menu$, ":" ) ) ) {		case 1: mes .npc$;				mes "Enter your current password";				next;				input .@cp$;				query_sql "SELECT `user_pass` FROM `login` WHERE `account_id` = '" + getcharid( 3 ) + "'", .@up$;				if ( .@up$ != .@cp$ ) {					mes .npc$;					mes "Your current password doesn't match the password you have provided";					break;				}				mes .npc$;				mes "Enter your new password";				next;				input .@np$;				mes .npc$;				mes "Are you sure you want to change your password?";				next;				if ( select( "Yes:No" ) - 1 ) break;				query_sql "UPDATE `login` SET `user_pass` = '" + escape_sql( .@np$ ) + "' WHERE `account_id` = '" + getcharid( 3 ) + "'";				mes .npc$;				mes "Your password has been changed";				break;		case 2: query_sql "SELECT `email` FROM `login` WHERE `account_id` = '" + getcharid( 3 ) + "'", .@email$;				mes .npc$;				mes "Your current email is : ^FF0000" + .@email$ + "^000000";				next;				if ( select( "Change my e-mail:Oh that is the e-mail i want to have" ) - 1 ) break;				mes .npc$;				mes "Enter your new e-mail";				next;				input .@new_email$;				mes .npc$;				mes "Do you really want to change your e-mail from ^FF0000" + .@email$ + "^000000 to ^FF0000" + .@new_email$ + "^000000?";				next;				if ( select( "Yes:No" ) - 1 ) break;				query_sql "UPDATE `login` SET `email` = '" + escape_sql( .@new_email$ ) + "'";				mes .npc$;				mes "Your e-mail has been changed";				break;		case 3: mes .npc$;				mes "Your current gender is ^FF0000" + ( Sex ? "Male" : "Female" ) + "^000000";				next;				if ( select( "I wish to change my gender:Okay" ) - 1 ) break;				mes .npc$;				mes "Are you sure you want to change your sex? By doing this, I will kick you out of the game";				if ( select( "Yes:No" ) - 1 ) break;				changesex;				break;		case 4: mes .npc$;				mes "Thank you for using this useful in-game control panel";				break;		default: break;	}	close;	OnInit:		.npc$ = "[ ^FF0000" + strnpcinfo( 1 ) + "^000000 ]";		setarray .menu$[ 0 ], "Password Change", "E-mail Change", "Sex Change", "Exit";		end;}

    Incomplete. 


  11. -	script	hourly_points	-1,{OnInit: //Configs	.time = 60 * 60 * 1000; // Time in milliseconds. Default: 1 hour (60 * 60 * 1000)	.max_idle = 15 * 30; // Maximum idle time in seconds	.points = 1; // Points to give the user each active hour.	.points_variable$ = "#CASHPOINTS"; // Variable name to store the points	end;OnPCLoginEvent:	addtimer .time, strnpcinfo(3)+"::OnPoints";	end;OnPoints:	if (checkidle() < .max_idle && checkvending() != 2) {		setd .points_variable$, getd(.points_variable$) + .points;		dispbottom "Current Balance = " + #CASHPOINTS;		goto OnPCLoginEvent;	}	end;}

     

     

    There you go. Edit it to further suit your needs:

     

    -	script	hourly_points	-1,{OnInit: //Configs	.time = 60 * 60 * 1000; // Time in milliseconds. Default: 1 hour (60 * 60 * 1000)	.max_idle = 15 * 30; // Maximum idle time in seconds	.points = 1; // Points to give the user each active hour.	.points_variable$ = "#CASHPOINTS"; // Variable name to store the points	end;OnPCLoginEvent:	addtimer .time, strnpcinfo(3)+"::OnPoints";	end;OnPoints:	if (checkidle() < .max_idle && checkvending() != 2) {		setd .points_variable$, getd(.points_variable$) + .points;	}	end;}

    Would trigger once only after script has been executed. 

     

     

     

    ohhh bro i love you! rsrsr i'm joke! kkkkk thx for the npc thx alot

     

    but =/ i forget to say one detail u.u  can you edit this npc to work with a "horlypoints" table in the logindb?

     

     

    this npc dont give point to player under @at, @autotrade or any command to open shop? checkvending() <<is it?

    how this npc will do a loop on timer? to stay giving points all the hours

    can you explain this?? sorry, i'm new on scripting... u.u

     

    jaBote

     can i do this?

     

    -    script    hourly_points    -1,{
    OnInit: //Configs
        .time = 60 * 60 * 1000; // Time in milliseconds. Default: 1 hour (60 * 60 * 1000)
        .max_idle = 15 * 30; // Maximum idle time in seconds
        .points = 1; // Points to give the user each active hour.
        .hptab$ = "hourlypoints"; // table name on logindb
        end;
     
    OnPCLoginEvent:
        addtimer .time, strnpcinfo(3)+"::OnPoints";
        end;
     
    OnPoints:
        if (checkidle() < .max_idle && checkvending() != 2) {
    query_sql "SELECT `account_id` FROM `char` WHERE `name`='"+strcharinfo(0)+"'",.@id;
    query_sql "UPDATE `login` SET `"+.hptab$+"` = `"+.hptab$+"`+"+.points+" WHERE `account_id`='"+.@id+"'";
    dispbottom "You received "+.points+"  Point by staying in-game for 1 hour";
    query_sql "SELECT `"+.hptab$+"` FROM `login` WHERE `account_id`='"+.@id+"'",.@hp;
    dispbottom "Current Balance = "+.@hp+" Cash";
        }
    dispbottom "You will not earn points if you stay afk for 15 minutes or open shop.";
    dispbottom "Current Balance = "+.@hp+" Cash";
        end;
    }

    You can access character and account variables. In your example instead of doing too many query_sql commands. You can do like 

    dispbottom "Current Balance = " + hourlypoints;
×
×
  • Create New...

Important Information

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