Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Teleportscrolls

Junior Spellweaver
Joined
Oct 4, 2006
Messages
148
Reaction score
3
Hello all i have a question. is somebody ever succeed to add new teleport scrolls in game?
without editing the existing 1? ore made teleports to maps with different index??

just asking.

THX
 
Junior Spellweaver
Joined
Oct 4, 2006
Messages
148
Reaction score
3
everythink whe do on kal is coding/scripting
 
Skilled Illusionist
Joined
Mar 20, 2009
Messages
374
Reaction score
378
Hello all i have a question. is somebody ever succeed to add new teleport scrolls in game?
without editing the existing 1? ore made teleports to maps with different index??

just asking.

THX

you can do it like this for example.

Code:
namespace CItem
	{
		int __fastcall Use(int* ItemPointer, void* edx, int* PlayerPointer)
		{
			int ret = (1);
			int ItemIndex = ((int*)((int*)ItemPointer)[10])[16];
			int TeleportScroll = (6000);
			int Coordinates[2];

			int nMap = map;
			Coordinates[0] = (x);    
			Coordinates[1] = (y);

			if (ItemIndex == TeleportScroll)
			{
				if (CPlayer::RemoveItem(PlayerPointer, 9, ItemIndex, 1))
				{
					CPlayer::Teleport(PlayerPointer, nMap, (int)Coordinates, 0, 0);
				}
			}


			else{ret = (CItem::Use(ItemPointer, PlayerPointer));}
			return ret;
		}
}
 
Junior Spellweaver
Joined
Oct 4, 2006
Messages
148
Reaction score
3
It's better to take care about 0x004d7900 (X), 0x004d7904 (Y) arrays and extend it, so you can use native inititem structure: (specialty (teleport 0 666))
indeed :) that is the way i was going for
 
Back
Top