GuildQuests/GuildUnlocks [One example completed]

smoochy boys on tour

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
114
I release this in the hopes, people stop making bad servers where they just make tons of items and throw in a few new monsters and call it a server hehe. This script is partially completed (left it incompleted on purpose so you actually learn how it works lol, i made one complete example for one quest) The concept of this script was to create guild quests, and guild unlocks that everyone in the particular guild can recieve.. What you want to do with the base script is up to you. Realize this just the main chunk of the script, you will need to make the quests up yourself, which i hope you learn how to do hehe :)

Code:
begin
[@main]
#IF
    HasGuild
#ACT
    FormatStr "FLD_GUILD='%s'" %GUILDNAME
    ReadValueSql  "TBL_GUILDUNLOCKS"  %A9  

"FLD_GUILD,FLD_UNLOCK1,FLD_UNLOCK2,FLD_UNLOCK3,FLD_UNLOCK4" [@theunlocks]

[@theunlocks()]
#ACT
Mov    A3      %ARG(1)    
Mov    D1      %ARG(2)
Mov    D2      %ARG(3)
Mov    D3      %ARG(4)
Mov    D4      %ARG(5)
#IF
   Equal  A3   ""
#ACT
    FormatStr "'%s',%s,%s,%s,%s" %GUILDNAME 0 0 0 0
    Mov A8 %A9
    FormatStr "FLD_GUILD='%s'" %GUILDNAME 
    Mov A2 %A9
    WriteValueSql "TBL_GUILDUNLOCKS" %A2 

"FLD_GUILD,FLD_UNLOCK1,FLD_UNLOCK2,FLD_UNLOCK3,FLD_UNLOCK4" %A8
goto @unlockquests

[@unlockquests]
#IF
Equal D1 0
#SAY
HealingGuildScroll\
This guild feature is locked! Continue to unlock it, or find out how.\
<[ Unlock HealingGuildScroll  ]/@healingscroll>
#ELSESAY
<[ Buy HealingGuildScroll 80k  ]/@buyhealingscroll>
#IF
Equal D2 0
#SAY
GuildPetScroll\
This guild feature is locked! Continue to unlock it, or find out how.\
<[ Unlock GuildPetScroll  ]/@guildpetscroll>


#IF
Equal D3 0
#SAY
TalismanBundles\
This guild feature is locked! Continue to unlock it, or find out how.\
<[ Unlock TalismanBundles  ]/@talismanbundles>


#IF
Equal D4 0
#SAY
PrivateStorageScroll\
This guild feature is locked! Continue to unlock it, or find out how.\
<[ Unlock PrivateStorageScroll  ]/@PrivateStorageScroll>

[@healingscroll]
#ACT
SET [45] 1    ;Need mapquest mondie script, set to 45 1, so it will then drop the item. 
#SAY
You need each guild member to click on this quest to activate it for them personally.\
There must be atleast 3 people at the time of death for the boss from your guild\
For this quest to work.\
However, anyone from your guild can complete this quest for the rest of the guild.\
You will need to go into DinoKingRoom Lair, and fight DinoKing,\
For the JurassicEmerald, remember you need 3 people in your group to complete it.\
<[ I have the JurassicEmerald  ]/@JurassicEmerald>

[@JurassicEmerald]
#IF
checkitem JurassicEmerald 1
#ACT
take JurassicEmerald 1
    FormatStr "FLD_GUILD='%s'" %GUILDNAME
    ReadValueSql  "TBL_GUILDUNLOCKS"  %A9  
    "FLD_GUILD,FLD_UNLOCK1" [@JurassicEme]

[@JurassicEme()]
#ACT
Mov    A3      %ARG(1)    
Mov    D1      %ARG(2)
Inc D1 1
  FormatStr "'%s',%s" %GUILDNAME %D1
    Mov A8 %A9
    FormatStr "FLD_GUILD='%s'" %GUILDNAME 
    Mov A2 %A9
    WriteValueSql "TBL_GUILDUNLOCKS" %A2 "FLD_GUILD,FLD_UNLOCK1" %A8
#SAY
HealingGuildScroll is now unlocked for the entire guild.

[@buyhealingscroll]
#IF
checkgold 80000
#ACT
take gold 80000
give HealingGuildScroll 1