Jump to content
  • 0

random spawn


Question

Posted

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

Recommended Posts

  • 0
Posted

For the random spawn (code side) you can take a look, for example, here. And about changing the description of the button I guess it's client side.

  • 0
Posted

not changing button, but adding new button

Adding a new one is clearly more client side than just changing the description :p

  • 0
Posted

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.

  • 0
Posted

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

I know it's not all client side but it's like 95% client 5% server...

Moving it to client dev help.

  • 0
Posted

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....

  • 0
Posted

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>

  • 0
Posted

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 -.-...

  • 0
Posted

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;

Guest
This topic is now closed to further replies.


×
×
  • Create New...