Jump to content
  • 0

Temporary Variables For Guilds


Mrew2

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  08/06/14
  • Last Seen:  

Trying to make a script where a guild can donate X amount of money to unlock access to the Guild Dungeon for two days. Then, after the two days, they have to re-donate again. I seem to be having an issue with how to set a temporary variable to a bunch of players without setting a quest and whether or not this works on offline characters or not.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Personally I resolved this by making an array where the index is the Guild ID so something like 

Line 287 of  https://github.com/Stolao/Npc_Release/blob/master/PvP_Ladder/Pvp_Ladder.txt

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  08/06/14
  • Last Seen:  

On 12/5/2016 at 6:42 AM, Stolao said:

Personally I resolved this by making an array where the index is the Guild ID so something like 

Line 287 of  https://github.com/Stolao/Npc_Release/blob/master/PvP_Ladder/Pvp_Ladder.txt

In the script you linked, there can only be one top guild. Can this work with multiple guilds? I can give a general outline of what I want to do with this script because I think I did a poor job of articulating earlier.

There will be two NPCs at each Castle Map, Pront/Payon/Geffen/Alde/Rachel/Yuno. Basically, they are going to be exactly like the Cats from renewal and the F2 guild dungeons. I noticed, at least with the current script, is that they only unlocked the dungeons for everybody instead of one particular guild. If it had, I would have just ripped the script from there. I want the guild leader to donate 10 million zeny to the 1st NPC and then that NPC will allow everybody in that guild to have access to the guild dungeon for the new 48 hours. Everybody in that guild can now talk to the 2nd NPC, who will teleport anybody, in the guild who donated, into the guild dungeon. I would also like other guilds to also be able to enter the dungeon at the same time with their own separate 48 hour timers.

I can make a script with most of this but I can't figure out how to make a temporary 48 hour timer without a quest being set and I'm not sure how to attach this said 48 hour timer to a guild, rather than one specific player. That is what I need help with. =X

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

You can't put a timer on a variable but what you can do is my method with a start time in the array number 

So kinda like this (on ohone can't code well)

Donate 10,000,000z 

Set $Guild_dun[getcharid(2)], get time;

 

Then do an on hour check clearing all index of the array > 48 hours old 

 

And in 2nd npc if($Guild_dun[getcharid(2) ) can enter

Else can't enter 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...