global weapon manager

I used for a previous system in the first xialza. Kondie hasn’t mentioned anything about wanting this back so I thought I might as well post it here.

if (playerenters)toweapons -globalweaponmanager;
if (playerenters && strtofloat(#s(server.globalweaponmode))>0){
  if (strtofloat(#s(server.globalweaponmode))==1 && !hasweapon(#s(server.globalweapon)))triggeraction 0,0,gr.addweapon,#s(server.globalweapon);
  if (strtofloat(#s(server.globalweaponmode))==2)triggeraction 0,0,gr.deleteweapon,#s(server.globalweapon);

To make this simple yet handy tool work you will need to the gr.addweapon and gr.deleteweapon triggerhacks which can be done through serveroptions.txt.

You must also set a server string called server.globalweaponmode to:
1 for adding a weapon
2 for removing a weapon
or 0 for just sitting there

Then you must also set a server string called #s(server.globalweapon).
This acts like a weapon list of what weapons you want to give all players.

It would be a good idea if your going to use this that you put it in defaultaccounts.txt otherwise I wouldnt know how you would manage to implement it.

Advantages of this system include not having to do account resets to get players up to date with weapon. Or removing illegal weapons from all players that have this weapon.

Disadvantages of this system is that since it runs off a player enters flag the player will have to enter a new level or relog before they get the weapon, a way around this is to use /updatelevelall in rc which forces players to re-enter the level although this rc feature doesnt seem to work properly. So you might just want to warp to the players and say update level then. Another issue is im not sure how many weapons this system can support at any one time.

Have fun :slight_smile:

Beautiful xD Thanks!

Cool, I have a feeling like I’ll be using this a lot once I get my server really going.

So much positive feedback, maybe I should post more scripts :0

lolol. xD Might be goood. I post mine to help people.

Sometimes it’s not about how clever/tough a script is but rather how good the idea of the script is. i.e. the idea is what’s useful sometimes, not necessarily the implementation. Props for both :wink:

Looks nice, but luckily with npc server, my weapon editing is more mostly done though the rc, as it edits the weapon file automatically. When I receive the new weapon it should update for others as well. But the functionality looks like it can be applied in a current manner. Maybe with my multiple viewing levels system.

Sent from my DROIDX

Meh, I like how it is. Nice job tric.

Sent from my COMPUTER

Yer but not everyone bothers using the npc server which doesnt properly work :\. Limited functionality = waste of space and time converting scripts and such

Yep, most of my scripts I’m just adding clientside to the top, but some things will be much easier with it…

Sent from my DROIDX

Only problem is that it won’t affect offline players.

I don’t even know why you’d want this.

Wont it affect them as soon as they log on?


how does this work if you want to have the mode set to 1 and 2, like you want it to delete some weapons, aswell as adding new ones

or do i just make a new npc and called it -globalweaponmanager2 and rename the strings etc etc

so one is dedicated to adding and one is dedicated to removing, at all times

Yeah, you would just make another one if you wanted that.

To my understandings you EDIT the server strings manually through rc…