Jump to content
  • 0

UNIQUE VIEW ID


Pantheon

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

Is that possible? That if you have the same PARTICULAR EQUIPMENT, but different SPRITES in different JOBS.

Example:

       I'm a pally and if I equip my PHOENIX WINGS it will show that the PHOENIX WINGS is ORANGE, but then if I equip it on the other JOBS like LORD KNIGHT it will show the PHOENIX WINGS but different color like GREEN maybe.

       The PHOENIX WINGS is just in one item ID and I want it to change in color when a specific JOB wear it. I already have the sprites, the problem is how to make it work.

 

*Thanks in advance guys, I would greatly appreciate any help you can give me in working with this problem.*


Link to comment
Share on other sites

21 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

itemID,........,{ }, { changelook LOOK_HEAD_BOTTOM, callfunc("func_WingSprite", 1); }, { changelook LOOK_HEAD_BOTTOM, 0; }
function	script	func_WingSprite	{
	switch (BaseJob) {
		case Job_Knight: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Crusader: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Blacksmith: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Alchemist: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Hunter: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Bard: return <wing_sprite_id_1>; 
		case Job_Dancer: return <wing_sprite_id_2>; 
		case Job_Wizard: return  (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Sage: return  (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Priest: return  (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Monk: return  (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		default: return;
	}
	return;
}

 

Edited by Emistry
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

Try
item script:

{},{ doevent "zxcasdqwe::OnEquip"; },{};

script:

-	script	zxcasdqwe	-1,{
end;

OnEquip:
	switch(Class) {
		case Job_Paladin:
			changelook LOOK_HEAD_BOTTOM, 3000;
			break;
		case Job_Lord_Knight:
			changelook LOOK_HEAD_BOTTOM, 3001;
			break;
		case Job_Champion:
			changelook LOOK_HEAD_BOTTOM, 3002;
			break;
		default:
			break;
	}
	end;
}

 

Edited by Technoken
forgot to change view ids XD
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   60
  • Joined:  09/23/17
  • Last Seen:  

8 minutes ago, Pantheon said:

Is that possible? That if you have the same PARTICULAR EQUIPMENT, but different SPRITES in different JOBS.

Example:

       I'm a pally and if I equip my PHOENIX WINGS it will show that the PHOENIX WINGS is ORANGE, but then if I equip it on the other JOBS like LORD KNIGHT it will show the PHOENIX WINGS but different color like GREEN maybe.

       The PHOENIX WINGS is just in one item ID and I want it to change in color when a specific JOB wear it. I already have the sprites, the problem is how to make it work.

 

*Thanks in advance guys, I would greatly appreciate any help you can give me in working with this problem.*

 

To do this you would need to add multiple versions of the wings client side and in the item's OnEquip script section set the look to the correct VIEW ID.

Also you had this answered 3 years ago:

Literally the same answer

Edited by TheDerpySupport
Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

you can do that if you are using the official way to add garments to your server

for headgears there is male and female spr/act

but for the garments there is male/female folders of the garment and each folder have spr/act for each job in the game

this is the list

https://github.com/sader1992/Garment_Files_Generator/blob/master/Garment Files Generator/KroNames.cs

you can just make a wing make if files >> (you can use this 

than color the act/spr for each job the color you want

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

16 minutes ago, TheDerpySupport said:

To do this you would need to add multiple versions of the wings client side and in the item's OnEquip script section set the look to the correct VIEW ID.

Also you had this answered 3 years ago:

Literally the same answer

Sorry @TheDerpySupport that I repost my old topic, but I already tried the changelook OnEquip but it only shows same sprite when I @job to different classes.

Can you give me a sample item script for that? Sorry NOOB here that wants to help my brothers private server. ???

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

18 minutes ago, sader1992 said:

you can do that if you are using the official way to add garments to your server

for headgears there is male and female spr/act

but for the garments there is male/female folders of the garment and each folder have spr/act for each job in the game

this is the list

https://github.com/sader1992/Garment_Files_Generator/blob/master/Garment Files Generator/KroNames.cs

you can just make a wing make if files >> (you can use this 

than color the act/spr for each job the color you want

Thanks @sader1992 for the guide, but I want the WINGS to place in lower headgear. Btw sir, does PRE-RE server support ROBE sprites?

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

1 minute ago, Pantheon said:

Btw sir, does PRE-RE server support ROBE sprites?

yes

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

4 minutes ago, sader1992 said:

yes

Do I have to put the script OnEquip in iteminfo?

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

1 minute ago, Pantheon said:

Do I have to put the script OnEquip in iteminfo?

No

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

4 minutes ago, sader1992 said:

No

Ok sir thanks for the info I will try it later.

@sader1992 Do you understand what @TheDerpySupport just quoted? I mean I just followed the the steps but still it doesnt work. Do I have to create mutliple VIEWID? If that is the case I will make also a multiple item id?

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

look more into this commands

*setlook <look type>,<look value>{,<char_id>};
*changelook <look type>,<look value>{,<char_id>};

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

4 minutes ago, sader1992 said:

look more into this commands


*setlook <look type>,<look value>{,<char_id>};
*changelook <look type>,<look value>{,<char_id>};

 

{},{ changelook 1,3000 {char_id}; changelook 1,3001 {char_id}; },{ changelook 1,0; }

 

WING 1 = 3000

WING 2 = 3001

 

Is that what you mean @sader1992?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

I want to make the specific wing to be unique in each job, example if the paladin equip the wing, it will view as red wing, if lord knight equip will view as blue wing and if the champion equip it will view as green wing. But the item will stay in the same ID not different item, so sir what should I put in OnEquip changelook script with different job and on UnEquip.

 

accessoryid.lua

ACCESSORY_RED_WING = 3000,

ACCESSORY_BLUE_WING = 3001,

ACCESSORY_GREEN_WING = 3002

accname.lua

[ACCESSORY_IDs.ACCESSORY_RED_WING] = “_RED_WING”,

[ACCESSORY_IDs.ACCESSORY_BLUE_WING] = “_BLUE_WING”,

[ACCESSORY_IDs.ACCESSORY_GREEN_WING] = “_GREEN_WING”

 

item_db.txt

{ Script },{ OnEquip_Script },{ OnUnequip_Script }

 

Please help me with thia guys, thanks ? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

1 hour ago, Technoken said:

Try
item script:


{},{ doevent "zxcasdqwe::OnEquip"; },{};

script:


-	script	zxcasdqwe	-1,{
end;

OnEquip:
	switch(Class) {
		case Job_Paladin:
			changelook LOOK_HEAD_BOTTOM, 3000;
			break;
		case Job_Lord_Knight:
			changelook LOOK_HEAD_BOTTOM, 3001;
			break;
		case Job_Champion:
			changelook LOOK_HEAD_BOTTOM, 3002;
			break;
		default:
			break;
	}
	end;
}

 

Thank you so sir @Technoken for the script I will try this later, btw sir what if what id sir I add gender like champion girl VIEWID 3000 and champion boy 3001, paladin girl 3003 and paladin boy 3004 thanks again sirrrrrrr ???

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   60
  • Joined:  09/23/17
  • Last Seen:  

1 minute ago, Pantheon said:

Yes sir, I understand. Im really very sorry..... ? 

Yep sirrrrr Im reading it until now. my problem and Im basing the script from @Technoken that I will just add gender in it. But I can find it ? sorry again for the stupid behavior Ive done

You will need to add if statements for each job check

		case Job_Paladin:
			if(Sex == 0){//female
			changelook LOOK_HEAD_BOTTOM, 3000;
			}else{ 
			changelook LOOK_HEAD_BOTTOM, 3001;}
			break;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

5 minutes ago, TheDerpySupport said:

You will need to add if statements for each job check


		case Job_Paladin:
			if(Sex == 0){//female
			changelook LOOK_HEAD_BOTTOM, 3000;
			}else{ 
			changelook LOOK_HEAD_BOTTOM, 3001;}
			break;

 

Thanks sir @TheDerpySupport I will try it now, I know how to put the item script but base on @Technoken just stated just below the item script, the "script", is that sa txt file like "SCRIPT_ZXCASDQWE.txt" and what folder will put that if that is the case?

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

39 minutes ago, Pantheon said:

Thanks sir @TheDerpySupport I will try it now, I know how to put the item script but base on @Technoken just stated just below the item script, the "script", is that sa txt file like "SCRIPT_ZXCASDQWE.txt" and what folder will put that if that is the case?

it's npc so you put it as any normal npc

 

and also i suggest you check this as i see you ask for every small thing so it's better to read the basics sometimes

https://github.com/rathena/rathena/tree/master/doc

https://github.com/rathena/rathena/blob/master/doc/script_commands.txt

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

@TheDerpySupport @sader1992 THANKS FOR YOUR HELP GUYS, I READ THE SCRIPT_COMMAND.TXT AND I FOUND SOME ANSWERS TO MY PROBLEM AND NOW IM TESTING IT IN THE OFFLINE SERVER I HAVE,  ONE MORE THING IS IT NATURAL THAT IT WILL NOT APPEAR IN THE EQUIPMENT WINDOW? I JUST USE VH AS A SAMPLE.

1.bmp

Edited by Pantheon
thanks for your help guys, i read the script_command.txt and i found some answers to my problem and now im testing it in the offline server i have, one more thing is it natural that it will not appear in the equipment window? i just use vh as a sample.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

4 minutes ago, Emistry said:

........{ setlook LOOK_HEAD_BOTTOM, callfunc("func_WingSprite"); }, {}, {}

function	script	func_WingSprite	{
	switch (BaseJob) {
		case Job_Knight: return <wing_sprite_id_1>;
		case Job_Crusader: return <wing_sprite_id_1>;
		case Job_Blacksmith: return <wing_sprite_id_1>;
		case Job_Alchemist: return <wing_sprite_id_1>;
		case Job_Hunter: return <wing_sprite_id_1>;
		case Job_Bard: 
		case Job_Dancer:
			return <wing_sprite_id_1>;
		case Job_Wizard: return <wing_sprite_id_1>;
		case Job_Sage: return <wing_sprite_id_1>;
		case Job_Priest: return <wing_sprite_id_1>;
		case Job_Monk: return <wing_sprite_id_1>;
		default: return;
	}
	return;
}

 

What if sir if you put gender, like paladin male = spriteid 1 then female paladin = spriteid 2 thanks ?

 

Edited by Pantheon
Addition: btw sir is that <wing_sprite_id_#> is the viewid or the wing.spr itself?
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

8 hours ago, Emistry said:

itemID,........,{ }, { changelook LOOK_HEAD_BOTTOM, callfunc("func_WingSprite", 1); }, { changelook LOOK_HEAD_BOTTOM, 0; }

function	script	func_WingSprite	{
	switch (BaseJob) {
		case Job_Knight: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Crusader: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Blacksmith: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Alchemist: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Hunter: return (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Bard: return <wing_sprite_id_1>; 
		case Job_Dancer: return <wing_sprite_id_2>; 
		case Job_Wizard: return  (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Sage: return  (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Priest: return  (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		case Job_Monk: return  (Sex) ? <wing_sprite_id_1> : <wing_sprite_id_2>; 
		default: return;
	}
	return;
}

 

next time please use *setitemscript since you want it to trigger from npc
npc script can totally control item database with *setitemdata and *setitemscript

Edited by AnnieRuru
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   0
  • Joined:  10/08/15
  • Last Seen:  

@Emistry, @Technoken, @sader1992, @TheDerpySupport, @AnnieRuru

Thanks for the help guys, I trying all the tut you tell me and it is really amazing and some works fine and other hmmm let say it works fine as well but don't fit to what I expecting. I'm try to explore til now to make my brother's server unique from others (I don't think so, maybe some had this feature), and I ended up to this final decision to the wings.

So, I remade Dragon Wings and I want it to be Armor Type (Headgear, Armor, etc params in item_db.txt) and the location is Lower Headgear. I want it to appear in the back of the character like the ROBE behavior (appears behind the char sprite), I try the Archangel Wings (2573) to change his location in item_db.txt to 1 (lower headgear) and it appears GOGGLES (VIEWID 1 in accname and accesoryid). That's why I request or asking for help in script in previous Phoenix Wings and I said it works fine but the problem is, the item don't appear in EQUIPMENT WINDOW (Alt+Q) and it still the Orange Phoenix Wings and all jobs. BUT NVM guys, if you can teach how to do it better or simple maybe hard way but its behavior will change to ROBE behavior, that when you open the equipment window it appears also and that's fine.

Thanks in advance.

Offtopic: how to post a Jpeg file from my computer. Thanks :)

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...