.dll files are extensions, not plugins. All plugins here are not something you'd compile to .dll, and there'd be no reason to. Sounds like someone gave you some false information that led you to believe that all plugins have to be .dll for itemv2.
Hurtworld itemv2 branch
Discussion in 'Hurtworld Discussion' started by CaptainNebulous, Jan 10, 2017.
-
Wulf Community Admin
-
There are some people that convert the plugins to ddl only to be able to use them without Steam...
-
Wulf Community Admin
-
-
Code:``` internal class Patching { // Token: 0x06000048 RID: 72 RVA: 0x000045F0 File Offset: 0x000027F0 public void PathNoSteam(KitsPlugin plg) { this.PathNoSteam(); bool flag = this.rest > 0; if (flag) { Singleton<ConsoleManager>.Instance.ExecuteCommand("quit"); } } // Token: 0x06000049 RID: 73 RVA: 0x00004624 File Offset: 0x00002824 public void PathNoSteam() { this.PathServInit(); } ```
-
Wulf Community Admin
-
When i download a Hurtworld item v2 server, using steamcmd, it download only one map - mangatang. But what about others - diemensland, nulliestest, why they are not loading with the server?
-
Wulf Community Admin
-
Wulf, Will u update Roll The Dice in breaks?
-
Please update the Oxide for the newest Hurtworld version
@WulfLast edited by a moderator: Aug 9, 2017 -
Wulf Community Admin
-
Code:
Console: RollTheDice.cs(212,61): error CS1502: The best overloaded method match for `HNetworkManager.SpawnPrefabClient(string, ushort, ushort, ERarity)' has some invalid arguments /home/k8169_s5095/server_5095/Assembly-CSharp.dll (Location of the symbol related to previous error) RollTheDice.cs(212,102): error CS1503: Argument `#2' cannot convert `float' expression to type `ushort'
Code:RaycastHit hitInfo; Physics.Raycast(position, Vector3.down, out hitInfo); { Quaternion rotation = Quaternion.Euler(0.0f, (float)UnityEngine.Random.Range(0f, 360f), 0.0f); rotation = Quaternion.FromToRotation(Vector3.down, hitInfo.normal) * rotation; ushort seed = (ushort)UnityEngine.Random.Range(0, 65535); Singleton<HNetworkManager>.Instance.SpawnPrefabClient(rolledSpawn.spawnName, 0f, (ushort)UnityEngine.Random.Range(0, 65535), ERarity.Common); numberSpawned++; }
-
fixed just
-
Code:
else if (rnd > sumItemChance /*+ sumStatChance*/ && rnd <= /*sumStatChance +*/ sumItemChance + sumSpawnChance) { count = sumItemChance /*+ sumStatChance*/; GameObject obj = new GameObject(); for (int i = 0; i < roll.spawns.Count && rolledSpawn.spawnName == null; i++) { count += roll.spawns[i].chance; if (count >= rnd) rolledSpawn = roll.spawns[i]; } var iterations = 0; var numberSpawned = 0; for (numberSpawned = 0; numberSpawned < rolledSpawn.amount && iterations < rolledSpawn.amount*100;) { Vector3 position = new Vector3(playerEntity.transform.position.x + Core.Random.Range(-10, 10), playerEntity.transform.position.y + Core.Random.Range(0, 10), playerEntity.transform.position.z + Core.Random.Range(-10, 10)); RaycastHit hitInfo; Physics.Raycast(position, Vector3.down, out hitInfo); { Quaternion rotation = Quaternion.Euler(0.0f, (float)UnityEngine.Random.Range(0f, 360f), 0.0f); rotation = Quaternion.FromToRotation(Vector3.down, hitInfo.normal) * rotation; ushort seed = (ushort)UnityEngine.Random.Range(0, 65535); ushort idk = 0; Singleton<HNetworkManager>.Instance.SpawnPrefabClient(rolledSpawn.spawnName, idk, seed, ERarity.Common); numberSpawned++; } iterations++; } BroadcastMsg(Msg("GiveRoll_SpawnGive") .Replace("{player}", session.Identity.Name) .Replace("{amount}", numberSpawned.ToString()) .Replace("{creature}", creatures[rolledSpawn.spawnName.ToLower()])); } else { var replacementFound = false; count = sumStatChance + sumItemChance + sumSpawnChance; for (int i = 0; i < roll.replacements.Count && rolledReplacement.itemid == 0; i++) { count += roll.replacements[i].chance; if (count >= rnd) rolledReplacement = roll.replacements[i]; } var noOfIterations = 0; for (int i = Core.Random.Range(0, playerinv.Capacity); !replacementFound && noOfIterations < 1000;) { if(playerinv.GetSlot(i) != null) { var item = itemmanager.GetItem(rolledReplacement.itemid); ItemObject iitem = itemmanager.CreateItem(item.Generator, rolledReplacement.amount); ItemObject replaceedItem = playerinv.GetSlot(i); replaceedItem = iitem; amanager.ItemReceivedServer(iitem, iitem.StackSize, session.Player); playerinv.Invalidate(false); replacementFound = true; BroadcastMsg(Msg("GiveRoll_ItemReplace") .Replace("{player}", session.Identity.Name) .Replace("{amount1}", replaceedItem.StackSize.ToString()) .Replace("{itemname1}", replaceedItem.Generator.ToString().Split('/').Last()) .Replace("{amount2}", playerinv.GetSlot(i).StackSize.ToString()) .Replace("{itemname2}", playerinv.GetSlot(i).Generator.ToString().Split('/').Last())); } noOfIterations++; } } return true; } void Destroy(GameObject obj) { timer.Once(600, () => { Singleton<HNetworkManager>.Instance.NetDestroy(uLink.NetworkView.Get(obj)); }); }
My plugin is working, but.. i can't reedem item and no communicate on chat who rolled.
Code:case "remove": rollname = args[1].ToLower(); if (!storedData.Rolls.Remove(rollname)) { ShowMsg(session, Msg("CmdRoll_NewRollNotExists")); return; } ShowMsg(session, Msg("CmdRoll_Remove").Replace("{rollname}", rollname)); if (rollEditor[session.SteamId.m_SteamID] == rollname) rollEditor.Remove(session.SteamId.m_SteamID); break; default: if (!rollEditor.TryGetValue(session.SteamId.m_SteamID, out rollname)) { ShowMsg(session, Msg("CmdRoll_NotInEdit")); return; } Roll roll; if (!storedData.Rolls.TryGetValue(rollname, out roll)) { ShowMsg(session, Msg("CmdRoll_Dirty")); return; } for (var i = 0; i < args.Length; i++) { object editvalue; var key = args[i].ToLower(); switch (key) {
I think if i repair it, plugin will work great -
Wulf Community Admin
-
Okey, is possible to get 5 languages from one plugin? im creating lang/en lang/pl and only lang/en is working.
-
Wulf Community Admin
-
Code:
string Msg(string msg, string SteamId = null) => lang.GetMessage(msg, this, SteamId); void ShowMsg(PlayerSession session, string msg) => hurt.SendChatMessage(session, msg); void BroadcastMsg(string msg) => hurt.BroadcastChat(msg); void Loaded() { LoadData(); lang.RegisterMessages(messages, this); try { rollsData = Interface.Oxide.DataFileSystem.ReadObject<Dictionary<ulong, Dictionary<string, RollData>>>("Rolls_Data"); } catch { rollsData = new Dictionary<ulong, Dictionary<string, RollData>>(); } }
-
Wulf Community Admin
-