Jump to content

Emistry

Forum Moderator
  • Posts

    9,746
  • Joined

  • Days Won

    305

Posts posted by Emistry

  1. make sure you have the correct and working sprites files for these new NPC that you added.

    If you're adding a custom sprite, check if you follow the sprite installation guide correctly or not.

  2. 7 minutes ago, GM Winter said:

    hello what i mean is the emperium is rotating but in the permanent place

    that's how the monster sprite work, if you want to remove the rotation, you have to remove the animation from the act file.

    download the ACT Editor, open the Emperium ACT file, then remove the animation, save it, and put it in your GRF to override the existing ACT file.

     

    if you want it to walk around, then follow what has been mentioned in previous post.

    Emperium by default, doesn't walk, it has no walking mode set to it.

  3. kill a player

    *unitkill <GID>;
    
    This command will kill a <GID>.

    or adjust EXP / Level

    BaseLevel   - Character's base level.
    JobLevel    - Character's job level.
    BaseExp     - Amount of base experience points.
    JobExp      - Amount of job experience points.
    NextBaseExp - Amount of base experience points needed to reach the next level.
    NextJobExp  - Amount of job experience points needed to reach the next level.

     

  4. instead of using the built-in vip system, you probably have to use a different approach.

    Give the item to player as rental items (may use rentitem(...) script commands)

    then make the item not tradable/storeable, need to be character bound.

    then every time check if the item exists in player inventory before proceed to access VIP features.

    However, you lost all the benefits of using the built-in VIP system that come with EXP bonus etc.

  5. the account_id has been deprecated from the database long time ago, simply adding back the column wont make it work since the column wont have any values stored in it.

    You have to change the SQL statement to retrieve the info that you needed.

    @total_guild_member = query_sql( "SELECT `account_id`, `char_id` FROM `char` WHERE `guild_id` = "+ [email protected]_id, @accountid_member, @charid_member );

     

    or a simple attempts

    -    script    guild_announce    -1,{
    OnWhisperGlobal:
    	if (!getcharid(2)) end;
    	.message_owner$ = strcharinfo(0);
    	.message$ = "";
    	for ([email protected] = 0; [email protected] < 10; [email protected]++)
    		.message$ = .message$ + (([email protected] > 0) ? "#":"") + @whispervar0$;
    	addrid(3, 0, getcharid(2));
    	announce "[ "+ .message_owner$ +" ]: "+ .message$, bc_self;
    	end;
    }

     

  6. if you just want the Emperium to walk around randomly, just set the monster mode to be walkable, there is no need to use additional npc script to control the movement unless u want a specific walking patterns/behaviours.

  7. try this

    31002,Bônus_Eletrônico,Bônus Eletrônico,2,10000,,2500,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc("F_PartyEarnCash"); },{},{}

    load this npc script

    function	script	F_PartyEarnCash	{
    	[email protected] = rand(1, 100);
    	#CASHPOINTS += [email protected]; 
    	dispbottom "PowkRO: Você Ganhou "+F_InsertComma([email protected])+" Rops.";
    		
    	[email protected]_id = getcharid(1);
    	if ([email protected]_id) {
    		[email protected]_aid = getcharid(3);
    		[email protected]_cid = getcharid(0);
    		
    		getpartymember [email protected]_id, 2;
    		[email protected] = [email protected];
    		for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) {
    			if ([email protected][[email protected]] == [email protected]_aid) 
    				continue;
    				
    			if (attachrid([email protected][[email protected]])) {
    				[email protected] = rand(1, 50);
    				#CASHPOINTS += [email protected]; 
    				dispbottom "PowkRO: Você Ganhou "+F_InsertComma([email protected])+" Rops.";
    				dispbottom "PowkRO: '"+strcharinfo(0)+"' gained "+F_InsertComma([email protected])+" Rops.", 0x00FF00, [email protected]_cid;
    				detachrid;
    			}
    		}
    	}
    	return;
    }

     

    • Upvote 1
  8. On 1/27/2022 at 2:13 PM, lLoydxx said:

    2 - I'm using the standard EndlessTower of the emulator but with an extra getitem I added, I tried to make the leader of the group receive 30 Bloody Twigs when killing Naght Sieger but nothing happens. This was the part I tried to add to make it work.

    all instance's monster have their own event label, you have to find the event label for the monster, and edit there.

    OnTimer10500:
    	set [email protected]$, instance_mapname("[email protected]");
    	mapannounce [email protected]$,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";
    	stopnpctimer;
    	monster [email protected]$,156,147,"Naght Sieger",1956,1,instance_npcname("#4th Beeper")+"::OnMyMobDead";   // <-------------- FIND THIS
    	end;
    
    OnMyMobDead:   // <-------------- FIND THIS
    	donpcevent instance_npcname("Lost Soul#102")+"::OnEnable";
    
    	// ADD THESE
    	//announce "[Torre Sem Fim]: O grupo "+ getpartyname( getcharid(1) ) +" acaba de matar Naght Sieger que dropou 30 Galhos Sangrentos como recompensa! Parab閚s a todos!", bc_all, "0x00ff99";
    	announce "[Torre Sem Fim]: Naght Sieger acaba de ser morto pelo grupo "+ getpartyname(getcharid(1)) +", eles receberam 30 Galhos Sangrentos como recompensa! Parabéns!", bc_all, "0x00ff99";
    	getitem 12103,30;
    	end;
    }

     

  9. prontera,155,181,5	script	Simple Bank	757,{
    	
    	query_sql("SELECT `deposit`, `tax` FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1", [email protected]_zeny, [email protected]_tax);
    	mes "You have "+F_InsertComma([email protected]_zeny)+" Zeny.";
    	mes "You contributed "+F_InsertComma([email protected]_tax)+" Zeny of Tax.";
    	mes " ";
    	switch(select(
    		"Deposit Zeny",
    		"Withdraw Zeny"
    	)) {
    		case 1:
    			input [email protected], 0, Zeny;
    			if ([email protected] < 100) {
    				mes "You cant deposit less than 100 Zeny.";
    			}
    			else if ((MAX_ZENY - [email protected]_zeny) < [email protected]) {
    				mes "Your bank can't hold that much of Zeny.";
    			}
    			else {
    				mes "You have deposited "+F_InsertComma([email protected])+" Zeny.";
    				Zeny -= [email protected];
    				query_sql("UPDATE `login` SET `deposit` = (`deposit` + "[email protected]+" - "+(([email protected] / 100) * 2)+"), `tax` = (`tax` + "+(([email protected] / 100) * 2)+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1");
    			}
    			break;
    		case 2:
    			input [email protected], 0, min([email protected]_zeny, 1000000000);
    			if ([email protected] <= 0) {
    				mes "You cant deposit 0 Zeny.";
    			}
    			else if ((MAX_ZENY - Zeny) < [email protected]) {
    				mes "You can't hold that much of Zeny.";
    			}
    			else {
    				mes "You have withdraw "+F_InsertComma([email protected])+" Zeny.";
    				Zeny += [email protected];
    				query_sql("UPDATE `login` SET `deposit` = (`deposit` - "[email protected]+") WHERE `account_id` = "+getcharid(3)+" LIMIT 1");
    			}
    			break;
    	}
    	close;
    }

    since tax value doesn't have limit, you probably should create the column with bigger datatype to support more than 2.1b value.

    • Love 1
  10. 18 hours ago, impulses said:

    I made 2 NPCs, but the daily hunting quests are linked with each other. Each NPC wants a different hunting quest.

    rename all the NPC within the files.

    If you are cloning to script to create different sets of quest, then you have to rename all the npcs, both script cant have same npc name.

  11. something like this ?

    
    
    prontera,155,181,5	shop	apple_shop	757,909:-1
    
    -	script	apple_shop_main	-1,{
    	
    	OnInit:
    		.item_id = 512;
    		.max_amount = 2000000;
    		
    		.shop_npc$ = "apple_shop";
    		
    	OnMinute00: // update every hour
    		hideonnpc .shop_npc$;
    		npcshopdelitem .shop_npc$, .item_id;
    		[email protected]$ = [email protected]$ + "SELECT `amount` FROM `inventory` WHERE `nameid` = "+.item_id;
    		[email protected]$ = [email protected]$ + " UNION ";
    		[email protected]$ = [email protected]$ + "SELECT `amount` FROM `cart_inventory` WHERE `nameid` = "+.item_id;
    		[email protected]$ = [email protected]$ + " UNION ";
    		[email protected]$ = [email protected]$ + "SELECT `amount` FROM `storage` WHERE `nameid` = "+.item_id;
    		[email protected]$ = [email protected]$ + " UNION ";
    		[email protected]$ = [email protected]$ + "SELECT `amount` FROM `guild_storage` WHERE `nameid` = "+.item_id;
    		[email protected] = query_sql([email protected]$, [email protected]);
    		for ([email protected] = 0; [email protected] < [email protected]; [email protected]++)
    			[email protected]_amount += [email protected][[email protected]];
    		
    		setiteminfo .item_id, ITEMINFO_SELL, (.max_amount / [email protected]_amount);
    		setiteminfo .item_id, ITEMINFO_BUY, (((.max_amount / [email protected]_amount) * 100) / rand(1, 3)));
    		
    		npcshopadditem .shop_npc$, .item_id, (.max_amount / [email protected]_amount);
    		hideoffnpc .shop_npc$;
    		end;
    }

     

    • Love 1
  12. should share your solution if its already solved.

    prontera,168,191,3	script	Treasure Summoner	4_F_JOB_BLACKSMITH,{
    	if (getgmlevel() >= 99) {
    		mes "Monster spawned.";
    		npctalk "Monster spawned!";
    		monster "prontera", 166, 192, "treasure", 1354, 1, strnpcinfo(0) + "::OnMobKilled";
    		close;
    	}
    	end;
    
    OnMobKilled:
    	getitem 501, 1; // rewards
    	end;
    }

     

  13. your rathena is outdated since it probably doesn't have the newer script_constants.hpp that declare the variables and its values.

    	/* castle data flags */
    	export_constant(CD_NONE);
    	export_constant(CD_GUILD_ID);
    	export_constant(CD_CURRENT_ECONOMY);
    	export_constant(CD_CURRENT_DEFENSE);
    	export_constant(CD_INVESTED_ECONOMY);
    	export_constant(CD_INVESTED_DEFENSE);
    	export_constant(CD_NEXT_TIME);
    	export_constant(CD_PAY_TIME);
    	export_constant(CD_CREATE_TIME);
    	export_constant(CD_ENABLED_KAFRA);
    	for( int i = CD_ENABLED_GUARDIAN00, j = 0; i < CD_MAX; i++, j++ ){
    		char constant[32];
    
    		sprintf( constant, "CD_ENABLED_GUARDIAN%02d", j );
    
    		script_set_constant( constant, i, false, false );
    	}
    	export_constant(CD_MAX);

     

×
×
  • Create New...

Important Information

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