Jump to content

Ruhn

Members
  • Posts

    72
  • Joined

  • Last visited

Posts posted by Ruhn

  1. 	OnOdinDead:
    		killmonster "odin_tem03","OdinTempInvasion::OnInvasionOdin";
    		killmonster "prontera","OdinTempInvasion::OnInvasionOdin";
    		announce "["+ strcharinfo(0) +"] has slain "+ getmonsterinfo(killedrid, MOB_NAME), bc_all;
    
    		// Reward tracking
    		MVPKills = MVPKills + 3;
    		dispbottom "---------------------------------------------------";
    		dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+".";
    		#mvp_points += 3;
    		dispbottom "You've gained three points! Your total is ["+#mvp_points+"] MvP point(s).";
    		dispbottom "---------------------------------------------------";
    
    		// Drop items around boss location
    		set @item_id, 512; // 
    		set @drop_count, 10;
    		set @x, 113;
    		set @y, 71;
    		set @i, 0;
    		while (@i < @drop_count) {
    			set @dx, @x + rand(-3,3);
    			set @dy, @y + rand(-3,3);
    			makeitem @item_id, 1, "odin_tem03", @dx, @dy;
    			set @i, @i + 1;
    		}
    
    		// Drop items around boss
    		set @item_id, 512;
    		set @drop_count, 10;
    		set @x, 113;
    		set @y, 71;
    		set @i, 0;
    		while (@i < @drop_count) {
    			set @dx, @x + rand(-3,3);
    			set @dy, @y + rand(-3,3);
    			makeitem @item_id, 1, "odin_tem03", @dx, @dy;
    			set @i, @i + 1;
    		}
    
    		// Distribute rewards
    		set @players, mobcountunitdmg(killedrid, 0);
    		set @item_reward, 1;
    		set @highest_dmg, 0;
    		set @highest_dmg_id, 0;
    		set @i, 0;
    		while (@i < @players) {
    			set @char_id, getunitdmginfo(killedrid, @i, 2);
    			set @account_id, getunitdmginfo(killedrid, @i, 0);
    			set @dmg, getunitdmginfo(killedrid, @i, 1);
    
    			if (@dmg > @highest_dmg) {
    				set @highest_dmg, @dmg;
    				set @highest_dmg_id, @account_id;
    			}
    
    			if (attachrid(@char_id)) {
    				getitem @item_id, @item_reward;
    				detachrid;
    			}
    			set @i, @i + 1;
    		}
    
    		// Double reward to highest damage dealer
    		if (attachrid(getcharid(3, @highest_dmg_id))) {
    			getitem @item_id, @item_reward;
    			detachrid;
    		}
    
    		// Double reward to last hitter (current player)
    		getitem @item_id, @item_reward;
    
    		end;
    }

    Why am I getting an error on this script? Can someone help me in fixing the script here?
    See attached screenshot for the error.
    image.png.e0642fc65ed636dcf35d63a8ebc94ef6.png

  2. Do you know what is the fix for 4th job classes black body? Only the default color palette is working but when you try to change into other clothes color, it will turn into black. I belive I have the necessary palette files. 

    If there's a different name for the Shadow Cross sprite, can someone tell it to me? Btw, I am using the 4th class sprite as a Bodystyle 2 costume. And it is using Assassin Cross sprite name.

  3. On 4/17/2025 at 12:14 AM, Racaae said:

    Hi. Find:

    OnTimer10800000:

    And replace:

    OnTimer9000000: //trigger on the minimum time (2.5 hours)
    	sleep rand(1800000); //Waits randomly until the max time (3 hours)

     

    Find:

    monster "prontera",98,186,"Gluttonous Plant",1750,1,"AntHellInvasion::OnInvasionAntHellPlant";

    And add below it:

    setunitdata($@mobid[0], UMOB_DMGIMMUNE, 1); //make Plant not killable

     

    Thanks a lot bro! It worked.

  4. 
    OnTimer10800000:
    stopnpctimer;
    
    		monster "prontera",98,186,"Gluttonous Plant",1750,1,"AntHellInvasion::OnInvasionAntHellPlant";
    	end;
    
    

    Im having a hard time getting this script to have a selection of its spawn time. Right now, it always spawn 3hours after server start and after kill. I want it to spawn randomly between 2.5 hours to 3hours.

    Tried adding switch(rand(2)){
    and put 2 cases but the script only summons the boss on the lowest OnTimer.

    Also, if it is possible, make the Plant not killable during the event was on.  This plant serves as indicator that the mvp had been summoned. 
    Some times players logged in after the announcement of the mvps arrival

  5. I need help finding the correct palette for knight's 4th job. The palette on the non riding sprite works fine but when i mount, the dragon and the body of 4th job knight is black.

    I made 4th job as costumes.

    The Male Knight Riding is being read as ·ÎµåÆäÄÚ_³²_2, then i added the palette named ·ÎµåÆäÄÚ_³²_1_2.pal. 

    This works on the normal 4th Job sprite.

  6. 0,1,{ bonus bMaxHPrate,1; bonus bDef,1; bonus bMdef,1; }
    0,2,{ bonus bMaxHPrate,2; bonus bDef,2; bonus bMdef,2; }
    0,3,{ bonus bMaxHPrate,3; bonus bDef,3; bonus bMdef,3; }
    0,4,{ bonus bMaxHPrate,4; bonus bDef,4; bonus bMdef,4; }
    0,5,{ bonus bMaxHPrate,5; bonus bDef,5; bonus bMdef,5; }
    0,6,{ bonus bMaxHPrate,6; bonus bDef,6; bonus bMdef,6; }
    0,7,{ bonus bMaxHPrate,7; bonus bDef,7; bonus bMdef,7; }
    0,8,{ bonus bMaxHPrate,8; bonus bDef,8; bonus bMdef,8; }
    0,9,{ bonus bMaxHPrate,9; bonus bDef,9; bonus bMdef,9; }
    0,10,{ bonus bMaxHPrate,10; bonus bDef,10; bonus bMdef,10; }
    0,11,{ bonus bMaxHPrate,11; bonus bDef,11; bonus bMdef,11; }
    0,12,{ bonus bMaxHPrate,12; bonus bDef,12; bonus bMdef,12; }
    0,13,{ bonus bMaxHPrate,13; bonus bDef,13; bonus bMdef,13; }
    0,14,{ bonus bMaxHPrate,14; bonus bDef,14; bonus bMdef,14; }
    0,15,{ bonus bMaxHPrate,15; bonus bDef,15; bonus bMdef,15; }

    Added this entry to refine_bonus.txt but when I wore +15 garment, it wont give the refine bonus stats. Is there any switch or should I do something first?

  7. On 9/9/2024 at 3:59 PM, hendra814 said:

    i want to share my custom world boss, please try it

    Welgaia,128,96,4	script	World Boss	123,{
    @_count = (.monster_kill_requirement - $world_boss_counter);
    mes "[ World Boss ]";
    mes "Status :" +($world_boss_active == 1?"^00FF00Active^000000":"^FF0000Inactive^000000");
    mes "Kill Remaining - [ ^0000FF"+$count+"^000000 ]";
    mes "=============================";
    mes "Reward:";
    mes "<ITEM>World Boss Reward<INFO>7539</INFO></ITEM>";
    end;
    
    OnNPCKillEvent:
    	if($world_boss_active == 1) end;
    		$world_boss_counter += 1;
    		if($world_boss_counter == .monster_kill_requirement){ 
    			donpcevent "World Boss::OnSummon";
    			}
    		end;
    
    OnSummon:
    	setarray .bc_city$[0],"alberta","aldebaran","geffen","izlude","morocc","payon","prontera","new_zone03";
    	setarray .bc_monster[0],"1917","1885","1874","1871","1832","1802","1785","1779","1768","1751","1734","1719","1708","1688","1685","1658","1651","1650","1649","1648","1647","1646","1630","1623","1583","1511","1502","1492","1418","1399","1389","1373","1312","1272","1252","1251","1190","1159","1157","1150","1147","1115","1112","1087","1086","1059","1046","1038","2202";
    	set .@city,rand(0,getarraysize(.bc_city$)-1);
    	set .@mvp,rand(0,getarraysize(.bc_monster)-1);
    	$world_boss_active = 1;
    	announce "Danger! "+.bc_city$[.@city]+" under attack by MvP!!",bc_all; //announce and end
    	monster .bc_city$[.@city],0,0,"City Attacker",.bc_monster[.@mvp],1,"World Boss::OnBossKill";
    	end;
    	
    OnBossKill:
    	announce "Congratulation to "+strcharinfo(0)+", for save the city "+.bc_city$[.@city]+" !",bc_all;
    	$world_boss_active = 0;
    	$world_boss_counter = 0;
    	getitem 7539,10;
    	end;
    		
    OnInit:
    	.monster_kill_requirement = 1000000;
    	freeloop(1);
    	while(1){
    		$count = (.monster_kill_requirement - $world_boss_counter);
    		waitingroom "Kill Left : ["+$count+"]",0;
    		sleep 1000; //= 1 Second Refresh
    		delwaitingroom;
    	}
    	freeloop(0);
    	end;
    }

     

    Why is the counter on negative and would not revert back to 0?

  8. ?@Tokei, on this part in which the boss got killed, how can i make this reward every party member in the instance?, also for example the summoned boss is "poring 1" it should only give "poring 1 loot" then for "poring 2" it should only give "poring loot 2" ?

     

    	// spawn mobs
    	setarray .@mobIds, 20570, 20571, 20572, 20573, 20574;
    	
    	.@mobId = .@mobIds[rand(getarraysize(.@mobIds))];
    	.@map$        = instance_mapname("demon_lair");
    	.@label_boss$ = instance_npcname(strnpcinfo(0))+"::OnMyBossDead";
    	monster .@map$,99,107,'mobNames$[.@mobId],.@mobId,1,.@label_boss$,2;
    	unittalk $@mobid[0],"Die ! You insolent fool!!";
    	end;
    
    OnMyBossDead:  //
    	specialeffect2 EF_MVP;
    	getitem 41000,50; //
    
    
    	// trigger other events
    	.@map$   = instance_mapname("demon_lair");
    	mapannounce .@map$,"He will resurrect, soon!",bc_map;
    	donpcevent instance_npcname("Reinfred#fin")+"::OnEnable";
    	end;
    }

     

  9. On 6/27/2024 at 7:16 AM, Tokei said:

    Well, normally you'd use what you did "--en--", or "--ja--". But if you want to pick the names yourself, you can do this:

    prontera,99,101,1	script	Demon Tomb	565,{
    	mes "stuff...";
    	setarray .@mobIds, 1002, 1003, 1004, 1005, 1006;
    	setarray .@mobNames$, "Poring 1", "Poring 2", "Poring 3", "Poring 4", "Poring 5";
    	
    	.@mobIdx = rand(getarraysize(.@mobIds));
    	.@mobId = .@mobIds[.@mobIdx];
    	.@mobName$ = .@mobNames[.@mobIdx];
    	monster .@map$,99,107,.@mobName$,.@mobId,1,.@label_boss$,2;
    	end;
    }

    If you prefer, you can use this approach below as well, same thing (I find it easier to handle in larger scripts, but there's really no difference).

    prontera,99,101,1	script	Demon Tomb	565,{
    	mes "stuff...";
    	setarray .@mobIds, 1002, 1003, 1004, 1005, 1006;
    
    	.@mobId = .@mobIds[rand(getarraysize(.@mobIds))];
    	monster .@map$,99,107,'mobNames$[.@mobId],.@mobId,1,.@label_boss$,2;
    	end;
    OnInstanceInit:
    	'mobNames$[1002] = "Poring 1";
    	'mobNames$[1003] = "Poring 2";
    	'mobNames$[1004] = "Poring 3";
    	'mobNames$[1005] = "Poring 4";
    	'mobNames$[1006] = "Poring 5";
    	end;
    }

     

    thanks @Tokei , the second one works fine. the first one does not give names.

  10. 2 hours ago, Tokei said:

    A couple things to learn here:

    • OnInit applies when the script is loaded, while OnInstanceInit applies when the instance is created. So in your case, you want to use OnInstanceInit.
    • "demon_lair" is the base map, but that's not the map inside your instance. You want to use instance_mapname("demon_lair");
    • Likewise, when you're setting up the event label, it is attempting to call it on the base NPC, not the instanced NPC. So you want to use
      instance_npcname(strnpcinfo(0)) + "::OnKilledAzhura"
    • "set" is a very much outdated command, use "=" instead.
    • "$AzhuraSpawned" is a global, permanent, variable. It is kept when your server restarts and it is also shared between instances. You want to use 'variable instead.

    So your script would look something like this (and using menu is weird):

    demon_lair,99,101,1	script	Demon Tomb	565,{
    	mes "[Tomb]";
    	mes "This is the resting place of a great demon named Azhura.";
    	next;
    	mes "[Tomb]";
    	mes "You can summon him through Nightmarish Ornament and Evil Energy.";
    	next;
    	mes "[Tomb]";
    	mes "Put the Nightmarish Ornament and Evil Energy.";
    	next;
    	
    	switch(select("Yes.:No.")) {
    		case 1:
    			if ('AzhuraSpawned) {
    				mes "The Great Demon Azhura is already here!";
    				close;
    			}
    			
    			if (countitem(41001) < 2) {
    				mes "You don't have the required items!";
    				close;
    			}
    			
    			delitem 41001, 2;
    			mapannounce .Map$, "Prepare for the unleashed evil!!", bc_map;
    			'AzhuraSpawned = 1;
    			monster .Map$, 99, 106, "Great Demon Azhura", 1973, 1, instance_npcname(strnpcinfo(0)) + "::OnKilledAzhura";
    			close;
    		case 2:
    			mes "[Tomb]";
    			mes "Come back when you have decided.";
    			close;
    	}
    	
    	end;
    OnKilledAzhura:
    	'AzhuraSpawned = 0;
    	end;
    OnInstanceInit:
    	.Map$ = instance_mapname("demon_lair");
    	end;
    }

     

    Thanks for the input, managed to figure it out mate. 

    I'm doing now is how to make it summon a random boss, like i have 5 bosses in array. xD

  11. Fixed with these code

    thanks @Poring King

    demon_lair,99,100,1	script	Demon Tomb	565,{
        mes "[Tomb]";
        mes "This is the resting place of a great demon named Azhura.";
        next;
        mes "You can summon him through Nightmarish Ornament and Evil Energy.";
        next;
        mes "Put the Nightmarish Ornament and Evil Energy.";
        menu "Yes", L_yes, "No", L_no;
        
    L_no:
        mes "[Tomb]";
        mes "Come back when you have decided.";
        close;
    
    L_yes:
        if ($AzhuraSpawned) {
            mes "The Great Demon Azhura is already here!";
            close;
        }
        if (countitem(41001) < 2) {
            mes "You don't have the required items!";
            close;
        }
        delitem 41001, 2;
    	hideonnpc "Demon Tomb";
        mapannounce .Map$, "Prepare for the unleashed evil!!", bc_map;
    	set $AzhuraSpawned, 1;
        monster .Map$, 99, 105, "Great Demon Azhura", 1864, 1, strnpcinfo(0) + "::OnKilledAzhura";
        end;
    
    OnKilledAzhura:
        set $AzhuraSpawned, 0;
    	enablenpc "Demon Tomb";
        end;
    
    OnInit:
        .Map$ = "demon_lair";
        set $AzhuraSpawned, 0;
        end;
    }

     

  12. Btw this is the whole code of the supposedly instance dungeon for summoning custom boss

    @Poring King

     

    prontera,156,162,5	script	Sample	757,{
    	.@instance_name$ = "Demon Vanquisher";
    	if (!is_party_leader()) end;
    	switch(select(
    		"Create",
    		"Enter",
    		"Destroy"
    	)) {
    		case 1:
    			instance_create(.@instance_name$, IM_PARTY);
    			break;
    		case 2:
    			switch(instance_enter(.@instance_name$)) {
    				case IE_NOMEMBER:
    					mes "ERROR: Party not found.";
    					break;
    				case IE_NOINSTANCE:
    					mes "ERROR: Party does not have an instance.";
    					break;
    				case IE_OTHER:
    					mes "ERROR: Unknown error.";
    					break;
    				default:
    					break;
    			}
    			break;
    		case 3:
    			instance_destroy(instance_id(IM_PARTY));
    			break;
    	}
    	end;
    }
    
    demon_lair,99,101,1	script	Demon Tomb	565,{
        mes "[Tomb]";
        mes "This is the resting place of a great demon named Azhura.";
        next;
        mes "You can summon him through Nightmarish Ornament and Evil Energy.";
        next;
        mes "Put the Nightmarish Ornament and Evil Energy.";
        menu "Yes", L_yes, "No", L_no;
        
    L_no:
        mes "[Tomb]";
        mes "Come back when you have decided.";
        close;
    
    L_yes:
        if ($AzhuraSpawned) {
            mes "The Great Demon Azhura is already here!";
            close;
        }
        if (countitem(41001) < 2) {
            mes "You don't have the required items!";
            close;
        }
        delitem 41001, 2;
        mapannounce .Map$, "Prepare for the unleashed evil!!", bc_map;
        set $AzhuraSpawned, 1;
        monster .Map$, 99, 106, "Great Demon Azhura", 1973, 1, strnpcinfo(0) + "::OnKilledAzhura";
        close;
    
    OnKilledAzhura:
        set $AzhuraSpawned, 0;
        end;
    
    OnInit:
        .Map$ = "demon_lair";
        set $AzhuraSpawned, 0;
        end;
    }

     

  13. 17 hours ago, Poring King said:

    Try this

    demon_lair,99,101,1    script    #Demon_Tomb    565,{
        mes "[Tomb]";
        mes "This is the resting place of a great demon named Azhura.";
        next;
        mes "You can summon him through Nightmarish Ornament and Evil Energy.";
        next;
        mes "Put the Nightmarish Ornament and Evil Energy.";
        menu "Yes", L_yes, "No", L_no;
        
    L_no:
        mes "[Tomb]";
        mes "Come back when you have decided.";
        close;
    
    L_yes:
        if (AzhuraSpawned) {
            mes "The Great Demon Azhura is already here!";
            close;
        }
        if (countitem(41001) < 2) {
            mes "You don't have the required items!";
            close;
        }
        delitem 41001, 2;
        mapannounce .Map$, "Prepare for the unleashed evil!!", bc_map;
        set AzhuraSpawned, 1;
        monster .Map$, 99, 106, "Great Demon Azhura", 1973, 1, strnpcinfo(0) + "::OnKilledAzhura";
        close;
    
    OnKilledAzhura:
        set AzhuraSpawned, 0;
        end;
    
    OnInit:
        .Map$ = "demon_lair";
        set AzhuraSpawned, 0;
        end;
    }

     

    Im getting this
    And monster still doesnt show.

     

    edit: managed to remove the error by adding $ but mobs still wont get summoned.
    image.png.12f47b4635dd3cd6796c3fcf57e465fa.png

  14. demon_lair,99,101,1    script    #Demon_Tomb    565,{
        mes "[Tomb]";
        mes "This is the resting place of a great demon";
        mes "named Azhura.";
        next;
        mes "You can summon him thru";
        mes "Nightmarish Ornament and Evil Energy";
        next;
        mes "Put the Nightmarish Ornament";
        mes "and Evil Energy.";
        menu "Yes",yes,"No",-;
        next;
            mes "[Tomb]";
            mes "Come back when you are decided.";
            close;
            end;
    yes:
    if( countitem(41001) < 2 )
        mes "You didnt have required item!";
    else{
        delitem 41001,2;
        mapannounce .Map$, "Prepare for the unleashed evil!!", bc_map;
        goto SummonAzhura;
        }
        end;
        
    SummonAzhura:
        monster .Map$,99,106,"Great Demon Azhura",1973,1,strnpcinfo(0)+"::OnKilledAzhura";
        end;
    
    OnKilledAzhura:
        disablenpc "#Demon_Tomb";
        end;
    
    OnInit:
        .Map$ = "demon_lair";
        end;
    
    }

    This is my code, the map announce and monster is not being summoned.

    No error on Map server

×
×
  • Create New...