PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
NO DMG ZONE

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Scripting Help
Display posts from previous:   

Author Message
westrupp



Joined: 01 Aug 2007
Posts: 26
Location: Brazil

PostPosted: Tue Aug 07, 2007 4:02 pm    Post subject: NO DMG ZONE Reply with quote

how create no-dmg zone? where i need change?

Thanks.

Author Message
Pierce



Joined: 02 Feb 2006
Posts: 256

PostPosted: Wed Aug 08, 2007 5:37 am    Post subject: Reply with quote

If you mean a no combat area, you can simply edit the regions.cfg file.
E.g.:
Code:

Region anyname
{
    Range       x1 y1 x2 y2
    Guarded     0
    NoCombat    1
    EnterText   You have entered the area of anyname
    LeaveText   You have left the the area of anyname
    midi        22
    Realm      britannia
}

Author Message
westrupp



Joined: 01 Aug 2007
Posts: 26
Location: Brazil

PostPosted: Fri Aug 10, 2007 1:50 pm    Post subject: Reply with quote

this work in pol093?

Author Message
Pierce



Joined: 02 Feb 2006
Posts: 256

PostPosted: Fri Aug 10, 2007 4:27 pm    Post subject: Reply with quote

If you take a look into the corechanges: No it don't work in pol93 Very Happy
You should update to a more recent version like 96 or 97 Smile

Author Message
westrupp



Joined: 01 Aug 2007
Posts: 26
Location: Brazil

PostPosted: Mon Mar 24, 2008 9:20 am    Post subject: Reply with quote

i maked cmd .nodmgareas to set no dmg zone to this i need edit i think more then 8 script but i maked Razz in pol095

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 85
Location: Montreal, Canada

PostPosted: Mon Mar 24, 2008 3:45 pm    Post subject: Reply with quote

If I understand well your plans, you'll need to verify your primary spell starter. That means the file that will initialize a spell and add an entry as if player is in this area there is no dmg. Then you'll need to open your combat starter (the file used to assign a hitscript or even the melee dmg) and add the above command lines to your script.

Exemple:

//That is used as a check
Code:
If(IsInThisArea(mobile))
SendSysMessage(mobile, "Damage is not allowed in this part of the World");
return;
Endif


The Function
Code:
Function IsInThisArea( who ) //You can name it as you want

   // Minoc Mine rectangle locations
   if( who.x >= 2554 ) //Minimum X
      if( who.x <2594>= 503 ) //Maximum Y
            if( who.y <= 442 ) //Minimum Y
               return 1;
            endif
         endif
      endif
   else
      return 0;
   endif
EndFunction


Of course, you'll need to add a check for everything that apply a dammage. That's why it would be much easier for you using a specific function to apply the dammage that would be used by every system that would apply dmg... and then you add a simple check. Thank you Distro097. Wink

Post new topic   Reply to topic    PenUltima Online Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty