Jump to content

MikZ

Members
  • Content Count

    461
  • Joined

  • Last visited

Posts posted by MikZ


  1. Hi,

    I don't if I/this was already requested before.
    But may i request a script that drop all player skulls from players inventory once player is killed.

    Like if player1 has 20 skulls in his inventory then player1 was killed by player 2. ALL the 30 skulls (+ 1 his own skull )will be drop from player1 inventory. 
    It's like kill and steal the skull.

    Thanks in advance!


  2. On 3/4/2018 at 1:06 AM, Alayne said:

    @MikZ resnametable have been added. Gonna look for the worldboss issue.

    Edit: Allright, fixed and pushed. You can get the last version from my github, tell me if you find other issues

    Hi @Alayne

    Im still getting these error in wold boss.

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


    Also just want to ask in your event master. what does this script means?

    set .start05,0; vs set .start06,1; whats the differences? 

    	if (.autoStart == 1 && .start01 == 1)
    OnClock2300:
    	if (.autoStart == 1 && .start23 == 1)
    	{
    		goto StartRandomEvent;
    	}
    	end;
    OnClock0000:
    	if (gettime(4) == 0)
    	{
    		set .invasorActivated, 0;
    	}
    	if (.autoStart == 1 && .start24 == 1)
    	{
    		goto StartRandomEvent;
    	}
    	end;
    
    
    OnInit:
    	set .autoStart, 1;
    	set .start01, 0;
    	set .start02, 0;
    	set .start03, 0;
    	set .start04, 0;
    	set .start05, 0;
    	set .start06, 1;
    	set .start07, 1;
    	set .start08, 1;
    	set .start09, 1;
    	set .start10, 1;
    	set .start11, 1;
    	set .start12, 1;
    	set .start13, 1;
    	set .start14, 1;
    	set .start15, 1;
    	set .start16, 1;
    	set .start17, 1;
    	set .start18, 1;
    	set .start19, 1;
    	set .start20, 1;
    	set .start21, 1;
    	set .start22, 1;
    	set .start23, 1;
    	set .start24, 0;

     


  3. On 3/4/2018 at 1:06 AM, Alayne said:

    @MikZ resnametable have been added. Gonna look for the worldboss issue.

    Edit: Allright, fixed and pushed. You can get the last version from my github, tell me if you find other issues

    Ayt! Thanks! I thought once I attached the resnametable it will fix all. But guess i need to duplicate all the maps for yggmazes map and add to mapcache T_T.

     

    I still got error this when NPC announces world boss.

    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)
    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)
    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)
    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)
    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)
    [Error]: script_rid2sd: fatal error ! player not attached!
    [Debug]: Function: announce (3 parameters):
    [Debug]: Data: string value="[ System ] World Boss vanished without being killed..."
    [Debug]: Data: number value=1
    [Debug]: Data: string value="65280"
    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)

     


  4. 56 minutes ago, Alayne said:

    Hey nice...According to the doc:

    
    
    For example:
    
    announce("This announcement will be shown to everyone in green.", bc_all, 0x00FF00);
    
    Will display a global announce in green. The color format is in RGB
    
    (0xRRGGBB).
      So basically, it shouldn't break at all...It's been a while since I last run my hercules so it might a bit outdated, but as announce have sometime to be triggered without players, I don't see how it's possible that a player should absolutely be linked...


    Did you changed something on the script? Cause it's not supposed to be a string as last argument, but 

    
    announce "[ System ] World Boss appeared in " + .@chosenMap$ + " !",bc_map,0xFF0000;

     

    I did not change any, just add the script in the server and got those script. After it, I then commit the script  under "//RATHENA" and uncommit the //HERCULES.


    I tried changing the bc_map to bc_all. got new error.

    
    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)
    [Error]: script_rid2sd: fatal error ! player not attached!
    [Debug]: Function: getelementofarray (2 parameters):
    [Debug]: Data: variable name='.@worldBossData' index=0
    [Debug]: Data: variable name='UMOB_HP' index=0
    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)
    [Warning]: script_get_val: cannot access player variable 'UMOB_HP', defaulting to 0

     


  5. [Debug]: Source (NPC): WorldBoss (invisible/not on a map)
    [Error]: script_rid2sd: fatal error ! player not attached!
    [Debug]: Function: announce (3 parameters):
    [Debug]: Data: string value="[ System ] World Boss appeared in [ Geffen] !"
    [Debug]: Data: number value=1
    [Debug]: Data: string value="16711680"
    [Debug]: Source (NPC): WorldBoss (invisible/not on a map)

    I also tried your world boss and I got these errors.


  6. On 2/27/2018 at 3:39 PM, Alayne said:

    Sorry thought it was allready in the release.

    Gonna add it tonight, as I don't have it with me right now.

    No worries, no need to be sorry. hope you'll upload the maps soonest . can't wait to try it. thanks!


  7. 4 hours ago, Alayne said:

    For the maze's maps, they're added through resnametable. Did you updated your mapcache with the given file?

     

    What do you mean in resnametable? how about the .gat files of yggmazes?. I did update and add those maps in my mapcache.

    Is it okay to share your resnametable? thanks!

     


  8. Solved! Emistry Currenshop! thanks @meko

    function	ValueConvert	{
    	set .@num, atoi(""+getarg(0));
    	if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);
    	set .@l, getstrlen(""+.@num);
    	for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {
    		set .@num$, .@num % (10 ** (.@i + 1)) / (10 ** .@i) + .@num$;
    			if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;
    	}
    	return .@num$;

     


  9. Good day ! I'm getting this error. kindly help we how to solve this. thanks!

    [Warning]: script error in file 'npc/custom/FRO/NPC/costumerental.txt' line 125 column 39
        This command is deprecated and it will be removed in a future update. Please see the script documentation for an alternative.
    
       122:         if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);
       123:         set .@l, getstrlen(""+.@num);
       124:         for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {
    *  125:                 set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
       126:                         if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;
       127:         }
       128:         return .@num$;
    
    

     

     


  10. anyone? 

    I tried below. but it seems it still count down even it player is offline. please help. thanks!
     

    if(gettimetick(2) - #lastTimeTalked > (60 * 60 * 24)) {
    
    
    .@delay = 60*60*24 - (gettimetick(2) - #lastTimeTalked);
    //  .@hours = .@delay / 60*60;
        .@hours = .@delay / (60*60);
        .@minutes = (.@delay - (.@hours*60*60)) / 60;
        .@seconds = (.@delay - (.@hours*60*60) - (.@minutes*60));
        mes "Sorry, you have to wait "+.@hours+" hour"+(.@hours>1?"s":"")+" "+.@minutes+" minute"+(.@minutes>1?"s":"")+" "+.@seconds+" second"+(.@seconds>1?"s":"")+" ";
        mes "Thank you!!";
    

     


  11. Good day Hercules Masters Scripters!

    May we request a NPC script that:

    • Gives reward to  player that played for 5 hours. Means Five (5) hours is the maximum hours.
    • If player reach 5 hours then the timer stop. Player needs to redeem the prize first to reset the playing hours.
    • Timer should only count if player is online.
    • If player is log off playing hours still be recorder and the countdown must stop to the time where player log off.

    Prizes is random with success %.

    Prize A. 80%; Prize B 60%; Prize C 50%; 40%; 30%; 20%; 10% 

    NPC message:

    If hour < 5 { You only Played 3 hours you still need to play for # of hours in order to redeem the prize.

    If hour = 5 . Thank you for playing here is your reward. at random success rate (%) ;  reset timer. 

    Thanks!



     


  12. 15 hours ago, Myriad said:

    First create a table, perhaps called orcs_memory
    Btw, this is just off the top of my head. I cannot confirm w

    
    Create table with the following columns:
    
    party_id (needs to be integer)
    party_name (needs to be string)
    time (needs to be string)
    

     

    Sorry, I'm still noob.
    wanted to have 5 members only in party.

    so that in checking NPC

    Dungeon Record holder

    Partyname: Member1, member2, member3, member4, member5.
    I have this,
    Is this correct?

    CREATE TABLE IF NOT EXISTS `Orcs` (
      `party_id` MEDIUMINT(7) NOT NULL DEFAULT '0',
      `party_name` VARCHAR(24) NOT NULL,
      `Name1` MEDIUMINT(6) NOT NULL DEFAULT '0',
      `Name2` MEDIUMINT(6) NOT NULL DEFAULT '0',
      `Name3` MEDIUMINT(6) NOT NULL DEFAULT '0',
      `Name4` MEDIUMINT(6) NOT NULL DEFAULT '0',
      `Name5` MEDIUMINT(6) NOT NULL DEFAULT '0',
      `date_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
      UNIQUE KEY `date` (`date_time`,`party_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    I have error,
    Added this:

    //== Entrance ==============================================
    2@orcs,1,1,0	script	Orcs_Memory_Timer	FAKE_NPC,{
        end;
    }
    gef_fild10,242,202,0	script	Dimensional Gorge Piece	2_MONEMUS,{
    
    	.@party_id = getcharid(CHAR_ID_PARTY);
    	.@p_name$ = getpartyname(.@party_id);
    	.@md_name$ = "Orc's Memory";
    OnMyMobDead:
    	stopnpctimer("Orcs_Memory_Timer");
    	.@PID = getcharid(CHAR_ID_PARTY);
    	.@PN$ = getpartyname(.@PID);
    	.@time = getnpctimer("Orcs_Memory_Timer") / 1000;
    	if (.@time < $Orcs_Memory_Record)
    	{
       		// This next bit will display time as 00:00:00 format
            .@hour$ = .@time % (24*60*60) / (60*60) + "";
            .@min$  = .@time % (24*60*60) % (60*60) / (60) + "";
            .@sec$  = .@time % (24*60*60) % (60*60) % (60) + "";
            .@time$ = "" +(getstrlen(.@hour$) == 1 ? "0" : "")+ "" + .@hour$ + ":" +(getstrlen(.@min$) == 1 ? "0" : "")+ "" + .@min$ + ":" +(getstrlen(.@sec$) == 1 ? "0" : "")+ "" + .@sec$ + "";
            announce("The " + getpartyname(CHAR_ID_PARTY) + " party cleared the dungeon in " + .@time$ + ", a new record!", bc_all);
            $Orcs_Memory_Record = .@time;
    	}
    	query_sql("INSERT INTO `orcs_memory` VALUES (" + .@PID + ", '" + escape_sql(.@PN$) + "', '" + .@time$ + "')");
    	donpcevent instance_npcname("Kruger#")+"::OnEnable";
    	.@map$ = instance_mapname("2@orcs");
    	.@mob_ran = rand(1,5);
    	if (.@mob_ran == 1) {
    		mapannounce .@map$, "Shaman Cargalache: How... How could this be... How could someone like you...!!",bc_map,"0xffff00";
    	}
    	else if (.@mob_ran == 2) {
    		mapannounce .@map$, "Shaman Cargalache: How is it that I've been overpowered by mere humans!",bc_map,"0xffff00";
    	}
    	else if (.@mob_ran == 3) {
    		mapannounce .@map$, "Shaman Cargalache: This... This can't be the end...",bc_map,"0xffff00";
    	}
    	else if (.@mob_ran == 4) {
    		mapannounce .@map$, "Shaman Cargalache: I... Can't die... Yet...!",bc_map,"0xffff00";
    	}
    	else {
    		mapannounce .@map$, "Shaman Cargalache: Defeated by these fools... It can't be happening...!",bc_map,"0xffff00";
    	}
    	donpcevent instance_npcname("#2Resurrect Monsters1")+"::OnDisable";
    	donpcevent instance_npcname("#2Resurrect Monsters3")+"::OnDisable";
    	donpcevent instance_npcname("#Warp Outside Orc Dun")+"::OnEnable";
    	end;
    }

    Resulted to

    [Warning]: Unexpected type for argument 1. Expected number.
    [Debug]: Data: string value="Orcs_Memory_Timer"
    [Debug]: Function: getnpctimer
    [Debug]: Source (NPC): #Boss Control at 0002@orcs (36,171)
    [SQL]: DB error - Column count doesn't match value count at row 1
    [Debug]: at d:\rao\hercules-master\src\map\script.c:17167 - INSERT INTO `orcs_memory` VALUES (0, '', '')
    [Debug]: Source (NPC): #Boss Control at 0002@orcs (36,171)


     


  13. 13 hours ago, meko said:

    src/map/atcommand.c

    but I would recommend doing it through a plugin rather than modifying vanilla source, else it makes updating harder because you have a bunch of git conflicts to fix

    just in src/map/atcommand.c no other files? thanks! I don't know how to create plugin. I already requested it here waiting for someone to help me.
    Can you help me? please.. Thanks!


  14. 23 hours ago, Myriad said:

    Before I start, I need to let you know a few things about my potential solution.

    1. I have never tried this before.
    2. I don't know how initnpctimer() interacts with instance NPCs.
    3. I don't have time to test. This might help you get started / understanding the process.
    
    // Add this NPC script to the OrcsMemory.txt instance script.
    	2@orcs,1,1,0    script    Orcs_Memory_Timer    FAKE_NPC,{
        end;
    }
    /*************
    * Notes
    **************
    Immediately after the instance is created, add
    this line below it:
    	initnpctimer("Orcs_Memory_Timer");
    
    I don't know how the Orc's Memory instance ends, but
    when it ends (maybe you need to add an event for when
    the mob is killed), add these lines:
    	stopnpctimer("Orcs_Memory_Timer");
    	.@time = getnpctimer("Orcs_Memory_Timer") / 1000;
    	if (.@time < $Orcs_Memory_Record)
    	{
       		// This next bit will display time as 00:00:00 format
            .@hour$ = .@time % (24*60*60) / (60*60) + "";
            .@min$  = .@time % (24*60*60) % (60*60) / (60) + "";
            .@sec$  = .@time % (24*60*60) % (60*60) % (60) + "";
            .@time$ = "" +(getstrlen(.@hour$) == 1 ? "0" : "")+ "" + .@hour$ + ":" +(getstrlen(.@min$) == 1 ? "0" : "")+ "" + .@min$ + ":" +(getstrlen(.@sec$) == 1 ? "0" : "")+ "" + .@sec$ + "";
            announce("The " + getpartyname(CHAR_ID_PARTY) + " party cleared the dungeon in " + .@time$ + ", a new record!", bc_all);
            $Orcs_Memory_Record = .@time;
    	}
    
    You will need to set the $Orcs_Memory_Timer to
    something really high before the first party
    does the instance. This is so the first party
    to clear the dungeon will be the first record.
    I advise going in-game and using the following
    atcommand:
    	@set $Orcs_Memory_Timer 1000000000
    	(that's 1 billion seconds lol)
    *************/
    

    Hi is there a way to query it to SQL?
    Cuz I want to create NPCs where player can check dungeon record time with "Party Name and the Members"


  15. Hi Hercules master scripters,

    I would like to ask seek support on how to add in any instance like OrcsMemory.txt a record time.
    For example:

    Party 1 finish the instance @ 20mins and 1 sec - will announce " Congratulation to @party Name: @playername1, @playername2 and @Playername3. for clearing the dungeon for 00:21:01

    then if another Party will finish the lesser 00:20:01 mins it will override the first record then announce and if higher nothing changes.

     


  16. 6 minutes ago, meko said:

    That's exactly what my script does, it assumes .@char_name$ and .@account_id are of the player in jail, not the player paying the bail. It checks the kill counter of the other player by using getvariableofpc(). You just need to add your release logic where it says Kaboom, and to add your dialog before the "Are you sure ..."

    ooh, apologies didn't notice that part.
     One last thing how to make the total bail amount in script.
    like:

    
    mes	" Total amount to bail "+.@amount+"";
    mesf("Are you sure you want to bail %s out of jail?", .@char_name$);
    	next();
    

    thanks!


  17. 1 minute ago, meko said:

    You don't need to use SQL at all for this; it can all be done in the script engine:

    
    	// this assumes the target player is online and those variables are filled:
    	// .@char_name$
    	// .@account_id
    	// .Rates
    
    	mesf("Are you sure you want to bail %s out of jail?", .@char_name$);
    	next();
    
    	if (select("Confirm", "Cancel") == 1) {
    		.@kill_counter = getvariableofpc(KILL_COUNTER, .@account_id);
    		.@cost = .Rates * .@kill_counter;
    
    		if (Zeny < .@cost) {
    			mes("You didn't have enough Zeny.");
    		} else {
    			Zeny -= .@cost;
    			mes("Kabooom!");
    		}
    	}
    	close;
    
    
    
    OnPCKillEvent:
    	if (readparam(BaseLevel, killedrid) < 50) {
    		++KILL_COUNTER;
    	}
    	end;

     

    I also want someone to bail him out , in the event that player is out of zeny.


  18. Good day!

    I wanted to ask help.

    I added column in my char Sql.

    ALTER TABLE `char` ADD COLUMN `kill` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `name`;

    what I wanted is that if player killed below level 50 players they will be jailed and if they want to go out they need to bail. bout zeny price depends on the number on player they kill.

    please help me how to make this work, to query char sql deaths

    to make

    zeny , zeny (amount * .killc);

     

    			
    	mes "Are you sure you want to bail - "+.@char_name$[.@i];
    				next;
    				if ( select( "Confirm","Cancel" ) == 1 ) {
    				query_sql( "SELECT `char_id`, `account_id`, `name`, `kill` FROM `char` WHERE `name` LIKE '%"+escape_sql( .@name$ )+"%' LIMIT 50", .@char_aid, .@account_aid, .@char_name$, .@killc );
    .@killc = .killc;
    					if( Zeny <  (.Rates * .killc) ){
    						mes "You didnt have enough Zeny.";
    						close;
    						}else{
    						set Zeny, Zeny - ( .Rates * .killc );
    						mes "Kabooom!";
                            close;
                    }

    thanks!

×
×
  • Create New...

Important Information

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