Restriction builder

I think I lost because I don't have idea how to check if player is in XX zones at same time and don't loop server.
 
I'would reply like you:

"Y"



What did you just wrote to me? xD I have functions ready, but I dont know how to check 10 zones at once and not loop server like your /wipecheck for example. PLEASE NEXT TIME READ CAREFULLY SO I'LL NOT WRITE ANYTHING TWICE AGAIN. . . . . Better, read whole topic from start so you'll remember where we are now.
 
I'would reply like you:

"Y"



What did you just wrote to me? xD I have functions ready, but I dont know how to check 10 zones at once and not loop server like your /wipecheck for example. PLEASE NEXT TIME READ CAREFULLY SO I'LL NOT WRITE ANYTHING TWICE AGAIN. . . . . Better, read whole topic from start so you'll remember where we are now.
Complete answer: Zone3D :p

I will go and do a Zone3D test, and test the copy cat plugin. Will reply with an example so you can use Zone3D and you don't have to for cycle
 
Python:
__author__ = 'DreTaX'
__version__ = '1.0'
import clr

clr.AddReferenceByPartialName("Fougerite")
import Fougerite

class ZoneTest:

    def On_Command(self, Player, cmd, args):
        if cmd == "create":
            zone = World.CreateZone("TestZoneee")
            #DataStore.Add("Zones", Player.SteamID, zone) Possible to use datastore
            Player.Message("Zone Created")
        elif cmd == "mark":
            #zone = DataStore.Get("Zones", Player.SteamID)
            zone = World.zones['TestZoneee']
            Server.Broadcast(str(zone))
            if len(zone.Points) == 0:
                zone.Mark(Player.X, Player.Y - 20.0)
                Player.Message("Zone needs " + str(4 - len(zone.Points)) + " more points")
            elif 0 < len(zone.Points) < 3:
                zone.Mark(Player.X, Player.Y)
                Player.Message("Zone needs " + str(4 - len(zone.Points)) + " more points")
            else:
                zone.Mark(Player.X, Player.Y + 20.0)
                #zone.ShowMarkers() Yay!.... Doesn't work because World.Spawn is broken -.- Issue reported
                Player.Message("Zone Created")
        elif cmd == "inzone":
            zone = World.zones['TestZoneee']
            Player.Message(str(zone.GlobalContains(Player)))
            Player.Message(str(zone.Contains(Player)))
        elif cmd == "points":
            zone = World.zones['TestZoneee']
            for p in zone.Points:
                Player.Message(str(p))



Oh well. I couldn't sort It out yet. It says I'm not in the zone for some reason. I have no idea why. I'm creating 4 points, but I think I'm not so OP in Vector2

mhm.

Python:
__author__ = 'DreTaX'
__version__ = '1.0'
import clr

clr.AddReferenceByPartialName("Fougerite")
import Fougerite

class ZoneTest:

    def On_Command(self, Player, cmd, args):
        if cmd == "create":
            zone = World.CreateZone("TestZoneee3")
            #DataStore.Add("Zones", Player.SteamID, zone) Possible to use datastore
            Player.Message("Zone Created")
        elif cmd == "mark":
            #zone = DataStore.Get("Zones", Player.SteamID)
            zone = World.zones['TestZoneee3']
            Server.Broadcast(str(zone))
            if len(zone.Points) == 0:
                zone.Mark(Player.X, Player.Y + 10.0)
                Player.Message("Zone needs " + str(4 - len(zone.Points)) + " more points")
            elif 0 < len(zone.Points) < 3:
                zone.Mark(Player.X, Player.Y + 10.0)
                Player.Message("Zone needs " + str(4 - len(zone.Points)) + " more points")
            else:
                zone.Mark(Player.X, Player.Y + 10.0)
                #zone.ShowMarkers() Yay!.... Doesn't work because World.Spawn is broken -.- Issue reported
                Player.Message("Zone Created")
        elif cmd == "inzone":
            zone = World.zones['TestZoneee3']
            Player.Message(str(zone.GlobalContains(Player)))
            Player.Message(str(zone.Contains(Player)))
        elif cmd == "points":
            zone = World.zones['TestZoneee3']
            for p in zone.Points:
                Player.Message(str(p))

I think I missunderstand something. @mikec ?
 
Sorry I will work on it now. Expect it even today, and I will try to do it in C# with source in this topic to lookup.

It's easy plugin but hope that in C# it will be faster as possible for Rust.

One thing: Do Fougerite have function to reload plugin without restart?
 
Sorry I will work on it now. Expect it even today, and I will try to do it in C# with source in this topic to lookup.

It's easy plugin but hope that in C# it will be faster as possible for Rust.

One thing: Do Fougerite have function to reload plugin without restart?

Not for C#.
 
  • Like
Reactions: MasterPeace
Sorry I will work on it now. Expect it even today, and I will try to do it in C# with source in this topic to lookup.

It's easy plugin but hope that in C# it will be faster as possible for Rust.

One thing: Do Fougerite have function to reload plugin without restart?
Python does. python.reload

The js engines do not have one currently.

C# cannot be reloaded, since Its hard to remove something from the assembly.
 
  • Like
Reactions: MasterPeace