Novice Fly Wing

International

Moderator: Moderators

jadjad
Plain Yogurt
Plain Yogurt
Posts: 53
Joined: 25 Mar 2009, 22:20
Noob?: No
Location: in front of my computer

Novice Fly Wing

#1 Post by jadjad »

Hi,

Is there a way for us to use Novice Fly Wing/Bwing instead of the Regular fly Wing/Bwing? I looked over the .pm files that trigger Teleport(1) but I cant find a string "Fly Wing". If somebody found a way to do this in config or in the .pm files, kindly share us your talent. :D

Thanks!
Image
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Novice Fly Wing

#2 Post by EternalHarvest »

Misc::useTeleport

Code: Select all

	# try to use item

	# could lead to problems if the ItemID would be different on some servers
	# 1 Jan 2006 - instead of nameID, search for *wing in the inventory
	# could lead to problems if the name is different on some servers
	# 11 Mar 2010 - instead of name, use nameID, names can be different for different servers
	my $item;
	if ($use_lvl == 1) {
		#$item = $char->inventory->getByName("Fly Wing");
		$item = $char->inventory->getByNameID(601);
	} elsif ($use_lvl == 2) {
		#$item = $char->inventory->getByName("Butterfly Wing");
		$item = $char->inventory->getByNameID(602);
	}
jadjad
Plain Yogurt
Plain Yogurt
Posts: 53
Joined: 25 Mar 2009, 22:20
Noob?: No
Location: in front of my computer

Re: Novice Fly Wing

#3 Post by jadjad »

Same.
I tried using

Code: Select all

$item = $char->inventory->getByName("Fly Wing"); 
instead of

Code: Select all

$item = $char->inventory->getByNameID(601);
but still got this:

Code: Select all

tele
You don't have the Teleport skill or a Fly Wing
I dont want to change the value for NameID since i have some chars that use the regular fly wings.
any more suggestions?
Image
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Novice Fly Wing

#4 Post by EternalHarvest »

Code: Select all

$item = $char->inventory->getByNameID(601) || $char->inventory->getByNameID(<id of novice fly wing>);
jadjad
Plain Yogurt
Plain Yogurt
Posts: 53
Joined: 25 Mar 2009, 22:20
Noob?: No
Location: in front of my computer

Re: Novice Fly Wing

#5 Post by jadjad »

works like a charm. thanks!
Image
Bahamut
Noob
Noob
Posts: 17
Joined: 30 Sep 2009, 04:40
Noob?: Yes

Re: Novice Fly Wing

#6 Post by Bahamut »

Do i have to recompile the proggram to make this patch working or just changing the pm files will do?

EDIT: I made the change but its not working, as i don't know how to compile the code, and i am under windows, can someone change it officially and, also update the item tables?
This is the change from iRO item ID tables, if someone can compile for me...

Code: Select all

	# 11 Mar 2010 - instead of name, use nameID, names can be different for different servers
	my $item;
	if ($use_lvl == 1) {
		#$item = $char->inventory->getByName("Fly Wing");
		$item = $char->inventory->getByNameID(601) || $char->inventory->getByNameID(<12323>);
	} elsif ($use_lvl == 2) {
		#$item = $char->inventory->getByName("Butterfly Wing");
		$item = $char->inventory->getByNameID(602) || $char->inventory->getByNameID(<12324>);
	}
because useSelf_item is not working for me..
jadjad
Plain Yogurt
Plain Yogurt
Posts: 53
Joined: 25 Mar 2009, 22:20
Noob?: No
Location: in front of my computer

Re: Novice Fly Wing

#7 Post by jadjad »

just edit Misc.pm
Image
Bahamut
Noob
Noob
Posts: 17
Joined: 30 Sep 2009, 04:40
Noob?: Yes

Re: Novice Fly Wing

#8 Post by Bahamut »

i did that but was not working, so i just created useitem functions inside config.txt ...
the item IDs is correct because i took from official iRO item.txt