Jump to content

Oxxy

Members
  • Content Count

    142
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Oxxy


  1. You will need to create a new event, something like OnPCPickItemUP, and then just create a simple NPC script.
     
    If you will manage to make that new event, the two commands you will need after are:

    consumeitem <item_id>;delitem <item_id>,1;

  2. @@Zhao Chow so you're saying you're NOT available to help but willing to help once you're available?

     

    So I almost got everything in english for client/server side of this package and also fixed up a few things. But I can't fix everything alone due to my inexperience. Is anyone willing to help me out? @@Neo @@jaBote @@evilpuncker @@Dastgir @@Mysterious @@mleo1 @@ossi0110 @@Judas @@kyeme @@bgamez23 @@Emistry @@GmOcean @@zackdreaver @@4144 @@Oxxy @@mrlongshen @@TecnoCronus @@Zhao Chow @@Ragnar Lothbrok.

     

     

    I tagged members I think might offer a helping hand. I already have a github to apply updates, I want to see this package move from Cronus to Hercules emu.

     

    I hope my dedication lingers off to someone of interest to help me out! This package has a ton of awesome sprites and scripts, it can be made better and needs issues fixed. C'mon lets make something REALLY nice for Hercules :P

    I can't help translating things for you, but might help you with some sources / scripts, do you have private repo created already?

    That's one thing I'm looking for. Some @commands error out and there's some db-errors etc. D:

    Add me on skype, or ICQ. Checkout my profile to see info.


  3.  

     

     

    //======Name========================================// Daily Login Rewards//======Version=====================================// 1.1// Author: Sandbox, Winterfox//======Comments====================================// Updated outdated Syntax-// Made slight optimizations.// Added a delay of 2 hours before the player is// able to claim his reward and only if he has// not been idle longer than 5 minutes in this// time frame.//==================================================-	script	DailyLoginRewards	-1,{	OnInit:		//Set to your server name		.Serv_Name$ = "Republic";		 //Set to desired item prizes		setarray( .D_Prize, 11501, 11502, 14533, 12210, 7539 );				 //Amount of prize to be given		setarray( .D_Amt, 400, 400, 4, 3, 2 );	end;	OnPCLoginEvent:		if( gettimetick( 2 ) < #ClaimDelay ) {			dispbottom( "Daily Login Activated. You allready got your daily login reward. " );			end;		}		// Show notice about the Daily Login Rewards		dispbottom( "Daily Login Activated. Please be Online for 2 hours without being idle for more than 5 minutes to receive daily login reward. " );		// Start a timer after 1 minute to sum up idle time		addtimer( 60000, strnpcinfo(3 ) + "::OnIdleCheck" );		// Start a timer to clam the daily reward after 2 hours		addtimer( 7200000, strnpcinfo(3) + "::OnStartClaim" );	end;	OnIdleCheck:		// Add the current idle time to the idle time counter.		#overallIdleTime += checkidle();		// Set a new timer to recheck after 1 minute.		addtimer( 60000,  strnpcinfo( 3 ) + "::OnIdleCheck" );	end;	OnStartClaim:		// If the idle time was 5 minutes or more in the last 2 hours reset to check if the person is the next 2 hours less idle than 5 minutes.		if( #overallIdleTime >= 300 ) {			#overallIdleTime = 0;			// Start a timer to clam the daily reward after 2 hours			addtimer( 7200000, strnpcinfo(3) + "::OnStartClaim" );			dispbottom( "You were afk for 5 minutes therefore you have to wait 2 hours again without ideling for more than 5 minutes to get your prize." );			end;		}		deltimer( strnpcinfo(3 ) + "::OnIdleCheck" );		// If the streak was broken reset the streak count.		if( gettimetick( 2 ) > #StreakDelay )  #LogStreak = 0;		// If the rewards reached their end, reset them.		if( #RewardStreak > getarraysize( .D_Prize ) ) #RewardStreak = 0;		if( #RewardStreak == 0 )			dispbottom( "Welcome to " + .Serv_Name$ + "! You've received " + .D_Amt[ #RewardStreak ] + " " + getitemname( .D_Prize[ #RewardStreak ] )+" for logging in! Visit us daily to get more prize! When you've managed to play with us for 5 consecutive days, you will receive bonus prizes!" );		if( #RewardStreak > 0 )			dispbottom( "Welcome back to " + .Serv_Name$ + "! You've received " + .D_Amt[ #RewardStreak ] + " " + getitemname( .D_Prize[ #RewardStreak ] ) + " for logging in! Visit us daily to get more prize! When you've managed to play with us for 5 consecutive days, you will receive bonus prizes!" );		getitem( .D_Prize[ #RewardStreak ], .D_Amt[ #RewardStreak ]);				#RewardStreak += 1;		#LogStreak += 1;		#ClaimDelay = gettimetick( 2 ) + 86400;		#StreakDelay = gettimetick( 2 ) + 172800;		if( #LogStreak == 5 ) {			for( .@i = 0; .@i < getarraysize( .D_Prize ); set .@i, .@i++ )				getitem( .D_Prize[.@i], .D_Amt[.@i] );			dispbottom( "Congratulations! You've received all the daily rewards for logging in 5 consecutive days!" );			#LogStreak = 0;		}	end;	OnPCLogoutEvent:		// Reset idle time on logout.		#overallIdleTime = 0;	end;}

    Hi, I've been trying the with my co-players the script didn't work. It doesn't give the daily reward. eventhough we've been playing for 2 hours without Idle time

    What's not working? Any errors map-server?

    There had been no errors in map-server

    Can't check the script by myself for now, for now I don't see any errors in script, but you could ask the original creator @@Winterfox, or maybe wait for somebody else, sorry for that!


  4. So I almost got everything in english for client/server side of this package and also fixed up a few things. But I can't fix everything alone due to my inexperience. Is anyone willing to help me out? @@Neo @@jaBote @@evilpuncker @@Dastgir @@Mysterious @@mleo1 @@ossi0110 @@Judas @@kyeme @@bgamez23 @@Emistry @@GmOcean @@zackdreaver @@4144 @@Oxxy @@mrlongshen @@TecnoCronus @@Zhao Chow @@Ragnar Lothbrok.

     

     

    I tagged members I think might offer a helping hand. I already have a github to apply updates, I want to see this package move from Cronus to Hercules emu.

     

    I hope my dedication lingers off to someone of interest to help me out! This package has a ton of awesome sprites and scripts, it can be made better and needs issues fixed. C'mon lets make something REALLY nice for Hercules :P

    I can't help translating things for you, but might help you with some sources / scripts, do you have private repo created already?


  5.  

    //======Name========================================// Daily Login Rewards//======Version=====================================// 1.1// Author: Sandbox, Winterfox//======Comments====================================// Updated outdated Syntax-// Made slight optimizations.// Added a delay of 2 hours before the player is// able to claim his reward and only if he has// not been idle longer than 5 minutes in this// time frame.//==================================================-	script	DailyLoginRewards	-1,{	OnInit:		//Set to your server name		.Serv_Name$ = "Republic";		 //Set to desired item prizes		setarray( .D_Prize, 11501, 11502, 14533, 12210, 7539 );				 //Amount of prize to be given		setarray( .D_Amt, 400, 400, 4, 3, 2 );	end;	OnPCLoginEvent:		if( gettimetick( 2 ) < #ClaimDelay ) {			dispbottom( "Daily Login Activated. You allready got your daily login reward. " );			end;		}		// Show notice about the Daily Login Rewards		dispbottom( "Daily Login Activated. Please be Online for 2 hours without being idle for more than 5 minutes to receive daily login reward. " );		// Start a timer after 1 minute to sum up idle time		addtimer( 60000, strnpcinfo(3 ) + "::OnIdleCheck" );		// Start a timer to clam the daily reward after 2 hours		addtimer( 7200000, strnpcinfo(3) + "::OnStartClaim" );	end;	OnIdleCheck:		// Add the current idle time to the idle time counter.		#overallIdleTime += checkidle();		// Set a new timer to recheck after 1 minute.		addtimer( 60000,  strnpcinfo( 3 ) + "::OnIdleCheck" );	end;	OnStartClaim:		// If the idle time was 5 minutes or more in the last 2 hours reset to check if the person is the next 2 hours less idle than 5 minutes.		if( #overallIdleTime >= 300 ) {			#overallIdleTime = 0;			// Start a timer to clam the daily reward after 2 hours			addtimer( 7200000, strnpcinfo(3) + "::OnStartClaim" );			dispbottom( "You were afk for 5 minutes therefore you have to wait 2 hours again without ideling for more than 5 minutes to get your prize." );			end;		}		deltimer( strnpcinfo(3 ) + "::OnIdleCheck" );		// If the streak was broken reset the streak count.		if( gettimetick( 2 ) > #StreakDelay )  #LogStreak = 0;		// If the rewards reached their end, reset them.		if( #RewardStreak > getarraysize( .D_Prize ) ) #RewardStreak = 0;		if( #RewardStreak == 0 )			dispbottom( "Welcome to " + .Serv_Name$ + "! You've received " + .D_Amt[ #RewardStreak ] + " " + getitemname( .D_Prize[ #RewardStreak ] )+" for logging in! Visit us daily to get more prize! When you've managed to play with us for 5 consecutive days, you will receive bonus prizes!" );		if( #RewardStreak > 0 )			dispbottom( "Welcome back to " + .Serv_Name$ + "! You've received " + .D_Amt[ #RewardStreak ] + " " + getitemname( .D_Prize[ #RewardStreak ] ) + " for logging in! Visit us daily to get more prize! When you've managed to play with us for 5 consecutive days, you will receive bonus prizes!" );		getitem( .D_Prize[ #RewardStreak ], .D_Amt[ #RewardStreak ]);				#RewardStreak += 1;		#LogStreak += 1;		#ClaimDelay = gettimetick( 2 ) + 86400;		#StreakDelay = gettimetick( 2 ) + 172800;		if( #LogStreak == 5 ) {			for( .@i = 0; .@i < getarraysize( .D_Prize ); set .@i, .@i++ )				getitem( .D_Prize[.@i], .D_Amt[.@i] );			dispbottom( "Congratulations! You've received all the daily rewards for logging in 5 consecutive days!" );			#LogStreak = 0;		}	end;	OnPCLogoutEvent:		// Reset idle time on logout.		#overallIdleTime = 0;	end;}

    Hi, I've been trying the with my co-players the script didn't work. It doesn't give the daily reward. eventhough we've been playing for 2 hours without Idle time

    What's not working? Any errors map-server?


  6.  

     

     

    Hello hercules,

     

    I have a question regarding SQL query. 

    When I redeem something from donations through the fluxCP, it gives me an item in-game. This is item ID 677 (I can spend that on special currency shops).

     

    Now my question is, how do i make a NPC with query that turns item 677 back into CP credits? Might i add the course isn't the same. 100x of item 677 is equal to 1 flux cp credit.

     

    I'd like the player to be able to input how many he wants to put back. This is all i could figure out... :(

     

    prontera,150,150,1	script	PutBack	987,{mes "Hi. Can i help you?";menu "Put coins back to CP",-;if (countitem(677) < 100){mes "I'm sorry, you need at least 100 coins because 100 is equal to 1 credit.";close;} mes "Input amount:"input (????) query_sql("UPDATE `cp_credits` SET `balance` = (????+00) WHERE `account_id` = '"+getcharid(3)+"'"); (is this right?)	delitem 677,(input amount here);	sleep2 10;dispbottom "Coins converted back to site credits.";}close;end;}

    Here you go:

     

    prontera,150,150,1    script    PutBack    987,{    mes "Hi. Can i help you?";    if(select("Put coins back to CP:Close") == 2) close;    if (countitem(677) < 100){        mes "I'm sorry, you need at least 100 coins because 100 is equal to 1 credit.";        close;    }        mes "Input amount:";    input .@a,100,1000;    if(.@a%100) {        mes "Can't transfer that much";        mes "Because your amount of coins ins't dividable by 100";        close;    }        if(countitem(677) < .@a) {        mes "You don't have enough "+getitemname(677);        mes "You need "+(.@a - countitem(677))+" more "+getitemname(677);        close;    }        next;    .@cp_credits = .@a/100;    mes "Here you go!";    mes "You will get "+.@cp_credits;        query_sql("UPDATE `cp_credits` SET `balance` = `balance` + "+ .@cp_credits +" WHERE `account_id` = '"+getcharid(3)+"'");    delitem 677, .@a;    close;}

     

    Didn't test it btw.

     

    Thank you sir, works perfectly!

     

     

     

     

     

     

     

    Hello hercules,

     

    I have a question regarding SQL query. 

    When I redeem something from donations through the fluxCP, it gives me an item in-game. This is item ID 677 (I can spend that on special currency shops).

     

    Now my question is, how do i make a NPC with query that turns item 677 back into CP credits? Might i add the course isn't the same. 100x of item 677 is equal to 1 flux cp credit.

     

    I'd like the player to be able to input how many he wants to put back. This is all i could figure out...  :(

     

     

     

     

     

     

    There's a check for that:

     

        if(!(.@a%100)) {        mes "Can't transfer that much";        mes "Because your amount of coins ins't dividable by 100";        close;    }

     

    Try this

     

    Tried, but now it doesnt let me put 400 either

     

    ...Ah, ok dastgir. :(

    Check my post again.

     

    Made the edit but oddly it still takes it.

     

     

     

    Didn't test it btw.

     

    Ah, i found an issue.

     

    If players input 1234, they take 1234 coins, but the credits on the CP only gets updated by 10. What do i need to edit so they can only input amounts that end with two (or three) zeros? >.<

     

     

      prontera,150,150,1    script    PutBack    987,{    mes "Hi. Can i help you?";    menu "Put coins back to CP",-;    if (countitem(677) < 100){    mes "I'm sorry, you need at least 100 coins because 100 is equal to 1 credit.";    close;    }    	 mes "Input amount:"    input (????)	 query_sql("UPDATE `cp_credits` SET `balance` = (????+00) WHERE `account_id` = '"+getcharid(3)+"'"); (is this right?)	    delitem 677,(input amount here);	    sleep2 10;    dispbottom "Coins converted back to site credits.";    }    close;    end;    }Here you go:prontera,150,150,1    script    PutBack    987,{    mes "Hi. Can i help you?";    if(select("Put coins back to CP:Close") == 2) close;    if (countitem(677) < 100){	    mes "I'm sorry, you need at least 100 coins because 100 is equal to 1 credit.";	    close;    }   	 mes "Input amount:";    input .@a,100,1000;    if(.@a%100) {	    mes "Can't transfer that much";	    mes "Because your amount of coins ins't dividable by 100";	    close;    }        if(.@a < 100 || .@a > 1000) close;   	 if(countitem(677) < .@a) {	    mes "You don't have enough "+getitemname(677);	    mes "You need "+(.@a - countitem(677))+" more "+getitemname(677);	    close;    }   	 next;    .@cp_credits = .@a/100;    mes "Here you go!";    mes "You will get "+.@cp_credits;   	 query_sql("UPDATE `cp_credits` SET `balance` = `balance` + "+ .@cp_credits +" WHERE `account_id` = '"+getcharid(3)+"'");    delitem 677, .@a;    close;}

     

    it can't just take 1234 coins, because if you will enter more than 1000, it will just interrupt the script.


  7.  

    Hello hercules,

     

    I have a question regarding SQL query. 

    When I redeem something from donations through the fluxCP, it gives me an item in-game. This is item ID 677 (I can spend that on special currency shops).

     

    Now my question is, how do i make a NPC with query that turns item 677 back into CP credits? Might i add the course isn't the same. 100x of item 677 is equal to 1 flux cp credit.

     

    I'd like the player to be able to input how many he wants to put back. This is all i could figure out... :(

     

    prontera,150,150,1	script	PutBack	987,{mes "Hi. Can i help you?";menu "Put coins back to CP",-;if (countitem(677) < 100){mes "I'm sorry, you need at least 100 coins because 100 is equal to 1 credit.";close;} mes "Input amount:"input (????) query_sql("UPDATE `cp_credits` SET `balance` = (????+00) WHERE `account_id` = '"+getcharid(3)+"'"); (is this right?)	delitem 677,(input amount here);	sleep2 10;dispbottom "Coins converted back to site credits.";}close;end;}

    Here you go:

     

    prontera,150,150,1    script    PutBack    987,{    mes "Hi. Can i help you?";    if(select("Put coins back to CP:Close") == 2) close;    if (countitem(677) < 100){        mes "I'm sorry, you need at least 100 coins because 100 is equal to 1 credit.";        close;    }        mes "Input amount:";    input .@a,100,1000;    if(.@a%100) {        mes "Can't transfer that much";        mes "Because your amount of coins ins't dividable by 100";        close;    }        if(countitem(677) < .@a) {        mes "You don't have enough "+getitemname(677);        mes "You need "+(.@a - countitem(677))+" more "+getitemname(677);        close;    }        next;    .@cp_credits = .@a/100;    mes "Here you go!";    mes "You will get "+.@cp_credits;        query_sql("UPDATE `cp_credits` SET `balance` = `balance` + "+ .@cp_credits +" WHERE `account_id` = '"+getcharid(3)+"'");    delitem 677, .@a;    close;}

     

    Didn't test it btw.


  8. Use NPC script:

    -    script    OnKillMonsterDoDropItem    -1,{    OnNPCKillEvent:    switch(killedrid) {        case 1002: // Poring            if(rand(10000) < 500) { // < 100 = 1% drop chance                getitem 7539, 1; // Poring Coin                break;            } else break;                default: // All other monsters            break;    }}

  9.  

     

    sir additional.... what if on a certain account? for example.. user id is : jaiko23

     

    btw sir @@Oxxy its working thanks a lot for your help ^_^

     

    if(getcharid(3) == account_id || strcharinfo(0) == "Player Name" || #vip == 1)

    so if guild id... ill just use

     

    if(getcharid(3) == guild_id || getcharid(3) == account_id || strcharinfo(0) == "Player Name" || #vip == 1)

     

     

    is this correct mr @@Oxxy ? yay thank you very much ! Glad your here to help us ^_^

    For guild id:

     

    if(getcharid(2) == guild_id || getcharid(3) == account_id || strcharinfo(0) == "Player Name" || #vip == 1)

  10. Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

     

    My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

    Interesting thing, I've found it earlier, but I guess forgot to update the script.

     

     

    Bug found, if for some reason, the server shuts down and a GM or player were inside the server (playing) the NPC double counts the login and shows duplicated values... example:

     

    My name is Infinite inside the game, i'm a GM, so i showed up on NPC online's list. but if i shut the server down, without loging off, and start it again and log in again, the server will show there are 2 GMs online, when i'm the only GM online.

    Change all $GM_ variables to $@GM_ variables, as the latter ones aren't saved between server restarts. Alternatively just clear the $GM_ variables in the OnInit section.

     

     

    @Oxxy: You could also add an option to specify by which column (map, level, name, ...) the character list should be ordered.

    Hm... will think about it, when will have time - gonna update it :-) ty for suggestions.


  11. Hi guys!

    I just want to know whats your opinion on me.

    i have client from france and he bought service from me all in all it was around 180$

    this includes the hosting, website design, full server setup + customization, Hashield and adelays.

     

    He paid me the full amount last june 4.

    and now i noticed my paypal account balance is negative and got notification that he refunded his payment.

    for the reason "Not authorized payment".

     

    Now i sent a letter in paypal about this incident and proving my evidence that he has the product or service he ordered. 

     

     

    Anyone got experience like this? is there a chance that my money will get back?

     

    Thank you for your advises..

    Please, create another thread about this person and leave everything you can about him, so people will know whom you deal with.


  12.  

    prontera,150,150,6    script    Aura NPC    700,{    mes "[Aura NPC]";    if(BaseLevel < 255 && JobLevel < 120) {        mes "I can't help you!";        close;    }    mes "Please choose an aura from the list!";    switch(select("Aura 1:Aura 2:Aura 3:Aura 4: Aura 5: Aura 6")) {		    case 1:		    next;		    mes "[Aura NPC]";		    mes "Your Aura was set to #1";		    aura 586,-1,-1;		    close;		   			 case 2:		    next;		    mes "[Aura NPC]";		    mes "Your Aura was set to #2";		    aura 586,362,-1;		    close;		   			 case 3:		    next;		    mes "[Aura NPC]";		    mes "Your Aura was set to #3";		    aura 586,362,240;		    close;		   			 case 4:		    next;		    mes "[Aura NPC]";		    mes "Your Aura was set to #4";		    aura 418,-1,-1;		    close;		   			 case 5:		    next;		    mes "[Aura NPC]";		    mes "Your Aura was set to #5";		    aura 486,-1,-1;		    close;		   			 case 6:		    next;		    mes "[Aura NPC]";		    mes "Your Aura was set to #6";		    aura 485,-1,-1;		    close;    }}
×
×
  • Create New...

Important Information

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