Jump to content
  • 0
xlaws27

kami-shi elemental races script help

Question

kami-shi is super busy as always

 

can someone help me with this? or can someone share their compatible hercules version of the disguise race scripts?

 

this is what i got:

 

[Error] script:callfunc: function not found! [setlook2]

Debug: Source (NPC): Race Master at prontera 138 195

 

this is the script T_T

//===== *Athena Script =======================================
//= Disguise Race Script
//===== By: ==================================================
//= KamiShi
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
//= *Athena SVN
//===== Description: =========================================
//= Race Master related stuff
//= We use permanent char variables to define races:

//= race_id = 0 // Human
//= race_id = 1 // Dark Elf
//= race_id = 2 // Light Elf
//= race_id = 3 // Merman
//= race_id = 4 // Orc
//= race_id = 5 // Vampire
//= race_id = 6 // Lycan
//= race_id = 7 // Dragoon
//= race_id = 8 // Demon
//= race_id = 9 // Dark Soul
//= race_id = 10 // Light Soul
//= race_id = 11 // Earth Element
//= race_id = 12 // Wind Element
//= race_id = 13 // Water Element
//= race_id = 14 // Fire Element
//= race_id = 15 // Electric Element
//= race_id = 16 // Shadow Element
//= race_id = 17 // Ghost Element
//= race_id = 18 // Poison Element
//= race_id = 19 // Holy Element
//= race_id = 20 // Undead Element

//=========================================================
// You should not use this following NPC if you don't want to 
// use the *disguise* system, but the *item* system.
//=========================================================

prontera,138,195,5	script	Race Master	897,{
	mes "[^008B00Race Master^000000]";
	if(race_id)
	{
		mes "I see that you got a race choose!";
		next;
		mes "[^008B00Race Master^000000]";
		mes "Do you want to become human again?";
		next;
		switch(select("No:Yes"))
		{
			case 1:
				mes "[^008B00Race Master^000000]";
				mes "I'll be here if you change your mind...";
				close;

			case 2:
				mes "[^008B00Race Master^000000]";
				mes "Done!";
				callfunc "unsetRaceHat";
				set race_id,0;
				callfunc("resetSavedSets");
				callfunc("setlook2", 6, 1);
				callfunc("setlook2", 7, 1);
				announce "[Race Master]: ["+strcharinfo(0)+"] has became a human again...",bc_all,"0xFFEBCD";
				close;
		}
	}
	mes "I can help you to change your Human essence.";
	mes "Which race are you interested in?";
	next;
	switch(select("Earth Element:Wind Element:Water Element:Fire Element:Electric Element:Shadow Element:Ghost Element:Poison Element:Holy Element:Undead Element"))
	{
		
			
		case 1: //Earth
				callfunc "BecomeRace", 11;
				break;
				
		case 2: //Wind
				callfunc "BecomeRace", 12;
				break;
		
		case 3: //Water
				callfunc "BecomeRace", 13;
				break;
				
		case 4: //Fire
				callfunc "BecomeRace", 14;
				break;
				
		case 5: //Electric
				callfunc "BecomeRace", 15;
				break;
				
		case 6: //Shadow
				callfunc "BecomeRace", 16;
				break;
				
		case 7: //Ghost
				callfunc "BecomeRace", 17;
				break;
				
		case 8: //Poison
				callfunc "BecomeRace", 18;
				break;
			
		case 9: //Holy
				callfunc "BecomeRace", 19;
				break;
				
		case 10: //Undead
				callfunc "BecomeRace", 20;
				break;

				
	}
	
	mes "[^008B00Race Master^000000]";
	mes "Now you are a ^008B00"+$RaceNames$[race_id]+"^000000!";
	announce "[Race Master]: ["+strcharinfo(0)+"] has became a "+$RaceNames$[race_id]+"",bc_all,"0xFFEBCD"; 
	
	close;
	

	
//=========== *DISGUISE SYSTEM* ==================
//= When the player log in, shows its race's ears.
//================================================

OnPCLoginEvent:
	callfunc "setRaceHat";
	end;
}

//=========== *DISGUISE SYSTEM* ==================
//==== callfunc ("BecomeRace", <id>); ============
//================================================

function	script	BecomeRace	{		
	
	set race_id,getarg(0);	// Race ID 
	callfunc("setlook2", 6, $RacePals[race_id*4+2]);	// Number of the first race hair dye
	callfunc("setlook2", 7, $RacePals[race_id*4]);	// Number of the first race clothes dye
	callfunc "setRaceHat";
	specialeffect2 248;	// Some fancy effect
	return;
	
}



//============= *DISGUISE SYSTEM* ================
//=== Set the hat view ID of a race char =========
//================================================

function	script	setRaceHat	{	
	set .@off, 0; // Change this value to increase / decrease hat view ID
	switch(race_id)
	{
		case 1: // Dark Elf
			setlook2 5,937+.@off;	
			break;

		case 2: // Light Elf
			setlook2 5,936+.@off;	
			break;

		case 3: // Merman
			setlook2 5,940+.@off;	
			break;
		
		case 4: // Orc
			setlook2 5,941+.@off;	
			break;
			
		case 5: // Vampire
			setlook2 5,938+.@off;	
			break;
		
		case 6: // Beast
			setlook2 4,939+.@off;	
			break;
			
		case 7: // Dragoon
			setlook2 4,942+.@off;	
			break;
			
		case 8: // Demon
			setlook2 5,943+.@off;	
			break;
		
		case 9: // DarkSoul
			setlook2 3,944+.@off;	
			break;
			
		case 10: // LightSoul
			setlook2 3,945+.@off;	
			break;
			
		case 11: // Earth
			setlook2 5,946+.@off;	
			break;

		case 12: // Wind
			setlook2 5,947+.@off;	
			break;

		case 13: // Fire
			setlook2 5,948+.@off;	
			break;
		
		case 14: // Water
			setlook2 5,949+.@off;	
			break;
			
		case 15: // Electric
			setlook2 5,950+.@off;	
			break;
		
		case 16: // Shadow
			setlook2 4,951+.@off;	
			break;
			
		case 17: // Ghost
			setlook2 4,952+.@off;	
			break;
			
		case 18: // Holy
			setlook2 5,953+.@off;	
			break;
		
		case 19: // Poison
			setlook2 3,954+.@off;	
			break;
			
		case 20: // Undead
			setlook2 3,955+.@off;	
			break;

		default: //Human
			break;
	}
	return;

}


//============= *DISGUISE SYSTEM* ================
//=== Unset the hat view ID of a race char =========
//================================================

function	script	unsetRaceHat	{	
	switch(race_id)
	{
		case 1: // Dark Elf
			setlook2 5,0;	
			break;

		case 2: // Light Elf
			setlook2 5,0;	
			break;

		case 3: // Merman
			setlook2 5,0;	
			break;
		
		case 4: // Orc
			setlook2 5,0;	
			break;
			
		case 5: // Vampire
			setlook2 5,0;	
			break;
		
		case 6: // Beast
			setlook2 4,0;	
			break;
			
		case 7: // Dragoon
			setlook2 4,0;	
			break;
			
		case 8: // Demon
			setlook2 5,0;	
			break;
		
		case 9: // DarkSoul
			setlook2 3,0;	
			break;
			
		case 10: // LightSoul
			setlook2 3,0;	
			break;
			
		case 11: // Earth
			setlook2 5,0;	
			break;

		case 12: // Wind
			setlook2 5,0;	
			break;

		case 13: // Fire
			setlook2 5,0;	
			break;
		
		case 14: // Water
			setlook2 5,0;	
			break;
			
		case 15: // Electric
			setlook2 5,0;	
			break;
		
		case 16: // Shadow
			setlook2 4,0;	
			break;
			
		case 17: // Ghost
			setlook2 4,0;	
			break;
			
		case 18: // Holy
			setlook2 5,0;	
			break;
		
		case 19: // Poison
			setlook2 3,0;	
			break;
			
		case 20: // Undead
			setlook2 3,0;	
			break;

		default: //Human
			break;
	}
	return;

}
Edited by xlaws27

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

AFAIK, theres 4 script provided with Kami Package, you should load those too, they have setlook2 function :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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