Region IDs in Cases

Share files with other Dawn of Light users

Moderator: Support Team

Region IDs in Cases

Postby Hiatus » Sun Jun 12, 2011 7:28 am

I currently use this for creating a marker in game (from a mob) that's why the getName is there. Can be modified greatly to do other things :)

Enjoy
Attachments
IDtoName.cs
(35.66 KiB) Downloaded 320 times
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Region IDs in Cases

Postby Etaew » Sun Jun 12, 2011 10:50 am

couldn't you just loop through the zones and regions loaded into memory and compare ID with WorldMgr instead of a switch? or a getByID method call.
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England

Re: Region IDs in Cases

Postby Hiatus » Sun Jun 12, 2011 1:31 pm

I use it for creating a certain marker mob in-game, it just creates the mob with where ever the region is with that specific region name, that's why I did getName and some other things.

Code: Select all


// this is in the AddToWorld method
if (this.GuildName.Length == 0)
{ this.GuildName = IDtoName.getName(this.CurrentZone.ID); }


public override string GuildName
{
get
{
return base.GuildName;
}
set
{

base.GuildName = value;
}
}
}
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Region IDs in Cases

Postby Graveen » Sun Jun 12, 2011 5:44 pm

Sorry Hiatus, what is exactly a 'marker' ?
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Region IDs in Cases

Postby Hiatus » Sun Jun 12, 2011 7:23 pm

its for something like foreach(GameNpc npc in WorldMgr.GetAllNPCsByGuild()

etc just finding the npc in the certain location, can be used for various amounts of things, this script can also be altered heavily to fit whatever tasks needed
Graveen wrote:If you can't see the problem, then this is the problem :mrgreen:
Hiatus
Support Team
 
Posts: 263
Joined: Sat Apr 30, 2011 3:54 pm

Re: Region IDs in Cases

Postby Dinberg » Thu Jun 16, 2011 11:43 pm

Hiatus, I think this will upset you ;)
Code: Select all
string RegionToName = this.CurrentRegion.Description
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim


Return to “%s” User Files

Who is online

Users browsing this forum: Bing [Bot] and 1 guest