Jump to content
  • 0

random spawn


erodz

Question

hey, i'm looking for a code with makes randon respawn on die, i mean when you die in farm zone or pvp zone usually small windows come out with button "to village" so i want to get code which makes new button with "random respawn" . so players can choose go to village or random respawn in the zone:) anyone have that code? thanks

Link to comment
Share on other sites

Recommended Posts

  • 0

Is nor only client you need core support for the new button.

 

make something like that for now and test;

 

default:

loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.random);

break;

 

 

Index: java/com/l2jserver/gameserver/datatables/MapRegionTable.java

Fortress,

+ random

}

 

public static MapRegionTable getInstance()

@@ -350,7 +351,7 @@

 

public Location getTeleToLocation(L2Character activeChar, TeleportWhereType teleportWhere)

{

- int[] coord;

+ int[] coord = null;

 

if (activeChar instanceof L2PcInstance)

{

@@ -415,6 +416,16 @@

return fort.getFortZone().getSpawnLoc();

}

 

+ if (teleportWhere == TeleportWhereType.random)

+ {

+ @SuppressWarnings({ "null", "unused" })

+ int coordinateX = coord[0];

+ @SuppressWarnings("unused")

+ int coordinateY = coord[1];

+ @SuppressWarnings("unused")

+ int coordinateZ = coord[2];

+ }

+

// If teleport to SiegeHQ

if (teleportWhere == TeleportWhereType.SiegeFlag)

{

 

I Don't tested.

Link to comment
Share on other sites

  • 0

ok, i was adding multifunctionzone codes in gs, added successfuly , compiled without warnings... but when i run GS i get town manager error: no such zone multifunctionzone... i checked 2 times looks all ok....

Link to comment
Share on other sites

  • 0

ok, i was adding multifunctionzone codes in gs, added successfuly , compiled without warnings... but when i run GS i get town manager error: no such zone multifunctionzone... i checked 2 times looks all ok....

It has nothing to do with the topic...

 

if gs says no such zone...

is about this side I think

Index: dist/game/data/xsd/zones.xsd
===================================================================
--- dist/game/data/xsd/zones.xsd        (revision 9872)
+++ dist/game/data/xsd/zones.xsd        (working copy)
@@ -145,6 +145,7 @@
                                                                        <xs:enumeration value="TerritoryWarZone" />
                                                                        <xs:enumeration value="TownZone" />
                                                                        <xs:enumeration value="WaterZone" />
+                                                                       <xs:enumeration value="MultiFunctionZone" />
                                                                </xs:restriction>
                                                        </xs:simpleType>
                                                </xs:attribute>

Link to comment
Share on other sites

  • 0

i can't find any zones.xsd

Did you use the patch adapted to the pack that are u using? Which pack are u using?...

Btw I moved the post here coz u were asking about the button, not for this -.-...

Link to comment
Share on other sites

  • 0

Then I guess is here the problem

 

Index: head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java      (revision 948)
+++ head-src/com/l2jfrozen/gameserver/datatables/xml/ZoneData.java      (working copy)
@@ -58,6 +58,7 @@
import com.l2jfrozen.gameserver.model.zone.type.L2FortZone;
import com.l2jfrozen.gameserver.model.zone.type.L2JailZone;
import com.l2jfrozen.gameserver.model.zone.type.L2MotherTreeZone;
+import com.l2jfrozen.gameserver.model.zone.type.L2MultiFunctionZone;
import com.l2jfrozen.gameserver.model.zone.type.L2NoHqZone;
import com.l2jfrozen.gameserver.model.zone.type.L2NoLandingZone;
import com.l2jfrozen.gameserver.model.zone.type.L2OlympiadStadiumZone;
@@ -240,6 +241,10 @@
                                                                {
                                                                        temp = new L2NoHqZone(zoneId);
                                                                }
+                                                               else if(zoneType.equals("MultiFunctionZone"))
+                                                               {
+                                                                       temp = new L2MultiFunctionZone(zoneId);
+                                                               }
                                                                else if(zoneType.equals("BossZone"))
                                                                {
                                                                        int boss_id = -1;

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...