Sign in to follow this  
WittleBunnBun

Automatic Village Invites For Spawn Town

Recommended Posts

Is there a way to program an NPC to be allowed to send player's a village invite? I want my spawn town to be open for all players, but I am not living on the deed so I cant send out an invite for players wanting to live in spawn. Is there a way to send auto village invites? 

Share this post


Link to post
Share on other sites

well there is a little trick to it.

the code itself uses 2 creatures, 1 is the invitor and the other is invitee . it uses the village of the invitor to decide where to invite the invitee to.

 

So of course it can be done but you would need to specify which deed the invitation will be for in the mod some how. Easiest way would be to specify the actual mayor of the deed. the invite code looks like this.

          VillageJoinQuestion vj = new VillageJoinQuestion(performer, "Settlement invitation", "Invitation to become citizen of a settlement.", invited.getWurmId());
          vj.sendQuestion();

performer is the player doing the invite and invited is the one receiving the invite. Which will then ask the player if they want to join.

 

So depends how you want it set up really. Name some deed in properties file? or name mayor in properties file? or some other way to tell mod which deed you want to invite people to.

 

I always say mods can do pretty much anything, comes down to ability of person making mod, the time it will take and if they can be bothered to put in the effort. ?

 

  • Like 1

Share this post


Link to post
Share on other sites

bump.   Cuddles seems to know how it works, but is there a modder that would like to try their hand at this and makeit public ? 

 

I would but Im not cool enough to know how to mod ?

Share this post


Link to post
Share on other sites

hmm i guess if you make a new item, throw it down on deed, add action to the item. then use the deed the item is on.

Item can even look like an NPC.

 

Yeah that would probably work, then no need to have stuff set in properties file.

Share this post


Link to post
Share on other sites
1 hour ago, Cuddles said:

added it to my GM deed maker, 

 

 

Tyvm. Downloading the mod now to give it a try!

Share this post


Link to post
Share on other sites

I tried this mod out and it makes everyone that joins the spawn deed as the mayor and you can't revoke their citizenship because it think's the toon is holding the deed paper, but they are not and glitches them into perm mayor. 

 

EDIT: I had to get the mayor status off by trading back and forth the deed paper then I could revoke citizenship,  but I dont want random players to have mayor status. Is there a way to only give out citizen status ? 

Edited by WittleBunnBun

Share this post


Link to post
Share on other sites
9 hours ago, WittleBunnBun said:

I tried this mod out and it makes everyone that joins the spawn deed as the mayor and you can't revoke their citizenship because it think's the toon is holding the deed paper, but they are not and glitches them into perm mayor. 

 

EDIT: I had to get the mayor status off by trading back and forth the deed paper then I could revoke citizenship,  but I dont want random players to have mayor status. Is there a way to only give out citizen status ? 

Good catch. I hadn't reached the point of doing extensive testing yet so thank-you for doing it!

 

~Nappy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this