- Feb 6, 2011
- 282
- 3
- 44
working on zordon's release of guildpoints system . however when bid for an area that is already purchased it allows both lesser bid and higher bid than current.
[@GuildAreaMain()]
#SAY
Would You like to check what guild area's are available?\
<GuildIsland1/@GuildIslandCheck1>\
<GuildIsland2/@GuildIslandCheck2>\
<GuildIsland3/@GuildIslandCheck3>\
<GuildIsland4/@GuildIslandCheck4>\
<GuildIsland5/@GuildIslandCheck5>\
<Exit/@Exit>\\
[@GuildIslandCheck1]
#IF
HasGuild
#ACT
FormatStr "FLD_GuildIsland1='%s'" %GUILDNAME
ReadValueSql "TBL_GUILDISLANDS" %A9 "FLD_GuildIsland1,FLD_CurrentBid1" [@CheckIslandsStatus1]
#ELSESAY
You dont have a guild.\
<Exit/@Exit>\\
[@CheckIslandsStatus1()]
#act
Mov A1 %ARG(1) ;Retrieves GuildName of Owner - GuildIsland1
Mov D1 %ARG(2) ;Retrieve current Bid Amount GuildIsland1
#IF
Equal A1 "" ;If there is no guild listed under this name it makes an entry below
#say
{FCOLOR/11}GuildIsland1{FCOLOR/12} - {FCOLOR/1}Available{FCOLOR/12}.\
Current Bid {FCOLOR/11}<$OUTPUT(D1)>{FCOLOR/12}.\
<Make a bid?/@FirstBidIsland1>\
<Go Back/@GuildAreaMain>\\
<Exit/@Exit>\\
#ELSESAY
{FCOLOR/11}GuildIsland1{FCOLOR/12} - Owned By {FCOLOR/1}<$OUTPUT(A1)>{FCOLOR/10} Guild.\
Current Bid {FCOLOR/11}<$OUTPUT(D1)>{FCOLOR/12}.\
<Make a higher bid?/@NewBidIsland1>\
<Go Back/@GuildAreaMain>\\
<Exit/@Exit>\\
[@FirstBidIsland1]
#ACT
MOV N1 0
MOV A6 0
MOV N6 0
#SAY
How much would you like to bid for GuildIsland1?\
<Enter Amount/@@FirstBid1>\
<Go Back/@GuildAreaMain>\
<Exit/@Exit>\\
[@@FirstBid1]
#ACT
MOV N1 %INPUTSTR
GOTO @CHECKFirstBID1
[@CHECKFirstBID1]
#SAY
Are you sure you wish to bid {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints?\
<Yes/@ContFirstBidding1>\
<Go Back/@GuildAreaMain>\
<Exit/@Exit>\\
[@ContFirstBidding1]
#ACT
FormatStr "FLD_GUILD='%s'" %GUILDNAME
ReadValueSql "TBL_GUILD" %A9 "FLD_GUILD,FLD_POINTS" [@CHECKGUILDPOINTS1]
[@CHECKGUILDPOINTS1()]
#ACT
MOV A3 %ARG(1)
MOV N3 %ARG(2)
GOTO @CHECKPOINTS1
[@CHECKPOINTS1]
#IF
ESMALL N3 %N1
#ACT
DEC N3 %N1
FormatStr "'%s',%s" %GUILDNAME 0
Mov A8 %A9
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A2 %A9
UpdateValueSql "TBL_GUILD" %A2 "FLD_GUILD,FLD_POINTS" %A8
FormatStr "'%s',%s" %GUILDNAME 0
Mov A8 %A9
FormatStr "FLD_GuildIsland1='%s'" %GUILDNAME
Mov A2 %A9
WriteValueSql "TBL_GUILDISLANDS" %A2 "FLD_GuildIsland1,FLD_CurrentBid1" %A8
goto @GiveIsland1First
#elsesay
Sorry you do not have {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints.\
<Try Again/@FirstBidIsland1>\
[@GiveIsland1First]
#ACT
INC N6 %N1 ;Adds This amount and overwrites previous bid for the area.
FormatStr "FLD_GuildIsland1='%s'" %GUILDNAME
Mov A8 %A9
FormatStr "FLD_CurrentBid1='%s'" %N6
UPDATEVALUESQL "TBL_GUILDISLANDS" %A8 %A9
MapTing DGI12906 0 160 230
MapTing DGI12907 0 160 230
#SAY
Congratulations. You have just purchased GuildIsland1 for {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints.\
<Go Back/@GuildAreaMain>\
<Thanks/@Exit>\\
[@NewBidIsland1]
#ACT
MOV N1 0
MOV A6 0
MOV N6 0
#SAY
How much would you like to bid for GuildIsland1?\
<Enter Amount/@@NewBid1>\
<Go Back/@GuildAreaMain>\
<Exit/@Exit>\\
[@@NewBid1]
#ACT
MOV N1 %INPUTSTR
GOTO @CHECKNewBID1
[@CHECKNewBID1]
#SAY
Are you sure you wish to bid {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints?\
<Yes/@ContNewBidding1>\
<Go Back/@GuildAreaMain>\
<Exit/@Exit>\\
[@ContNewBidding1]
#ACT
FormatStr "FLD_GUILD='%s'" %GUILDNAME
ReadValueSql "TBL_GUILD" %A9 "FLD_GUILD,FLD_POINTS" [@CHECKNEWGUILDPOINTS1]
[@CHECKNEWGUILDPOINTS1()]
#ACT
MOV A3 %ARG(1)
MOV N3 %ARG(2)
GOTO @CHECKNEWPOINTS1
[@CHECKNEWPOINTS1]
#IF
ESMALL N3 %N1
#ACT
DEC N3 %N1
FormatStr "'%s',%s" %GUILDNAME 0
Mov A8 %A9
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A2 %A9
UpdateValueSql "TBL_GUILD" %A2 "FLD_GUILD,FLD_POINTS" %A8
INC N6 %N1 ;Adds This amount and overwrites previous bid for the area.
FormatStr "FLD_GuildIsland1='%s'" %GUILDNAME
Mov A8 %A9
FormatStr "FLD_CurrentBid1='%s'" %N6
UPDATEVALUESQL "TBL_GUILDISLANDS" %A8 %A9
MapTing DGI12906 0 160 230
MapTing DGI12907 0 160 230
#SAY
Congratulations. You have just purchased GuildIsland1 for {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints.\
<Go Back/@GuildAreaMain>\
<Thanks/@Exit>\\
#elsesay
Sorry you do not have {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints.\
Or your Bid of {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints is lower than {FCOLOR/11}<$OUTPUT(D1)>{FCOLOR/12} Current Bid of GuildPoints.\
<Try Again/@NewBidIsland1>\
im sure there is something missing that checks if u have correct Points .
would anyone who has uded this system please be able to help me?
[@GuildAreaMain()]
#SAY
Would You like to check what guild area's are available?\
<GuildIsland1/@GuildIslandCheck1>\
<GuildIsland2/@GuildIslandCheck2>\
<GuildIsland3/@GuildIslandCheck3>\
<GuildIsland4/@GuildIslandCheck4>\
<GuildIsland5/@GuildIslandCheck5>\
<Exit/@Exit>\\
[@GuildIslandCheck1]
#IF
HasGuild
#ACT
FormatStr "FLD_GuildIsland1='%s'" %GUILDNAME
ReadValueSql "TBL_GUILDISLANDS" %A9 "FLD_GuildIsland1,FLD_CurrentBid1" [@CheckIslandsStatus1]
#ELSESAY
You dont have a guild.\
<Exit/@Exit>\\
[@CheckIslandsStatus1()]
#act
Mov A1 %ARG(1) ;Retrieves GuildName of Owner - GuildIsland1
Mov D1 %ARG(2) ;Retrieve current Bid Amount GuildIsland1
#IF
Equal A1 "" ;If there is no guild listed under this name it makes an entry below
#say
{FCOLOR/11}GuildIsland1{FCOLOR/12} - {FCOLOR/1}Available{FCOLOR/12}.\
Current Bid {FCOLOR/11}<$OUTPUT(D1)>{FCOLOR/12}.\
<Make a bid?/@FirstBidIsland1>\
<Go Back/@GuildAreaMain>\\
<Exit/@Exit>\\
#ELSESAY
{FCOLOR/11}GuildIsland1{FCOLOR/12} - Owned By {FCOLOR/1}<$OUTPUT(A1)>{FCOLOR/10} Guild.\
Current Bid {FCOLOR/11}<$OUTPUT(D1)>{FCOLOR/12}.\
<Make a higher bid?/@NewBidIsland1>\
<Go Back/@GuildAreaMain>\\
<Exit/@Exit>\\
[@FirstBidIsland1]
#ACT
MOV N1 0
MOV A6 0
MOV N6 0
#SAY
How much would you like to bid for GuildIsland1?\
<Enter Amount/@@FirstBid1>\
<Go Back/@GuildAreaMain>\
<Exit/@Exit>\\
[@@FirstBid1]
#ACT
MOV N1 %INPUTSTR
GOTO @CHECKFirstBID1
[@CHECKFirstBID1]
#SAY
Are you sure you wish to bid {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints?\
<Yes/@ContFirstBidding1>\
<Go Back/@GuildAreaMain>\
<Exit/@Exit>\\
[@ContFirstBidding1]
#ACT
FormatStr "FLD_GUILD='%s'" %GUILDNAME
ReadValueSql "TBL_GUILD" %A9 "FLD_GUILD,FLD_POINTS" [@CHECKGUILDPOINTS1]
[@CHECKGUILDPOINTS1()]
#ACT
MOV A3 %ARG(1)
MOV N3 %ARG(2)
GOTO @CHECKPOINTS1
[@CHECKPOINTS1]
#IF
ESMALL N3 %N1
#ACT
DEC N3 %N1
FormatStr "'%s',%s" %GUILDNAME 0
Mov A8 %A9
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A2 %A9
UpdateValueSql "TBL_GUILD" %A2 "FLD_GUILD,FLD_POINTS" %A8
FormatStr "'%s',%s" %GUILDNAME 0
Mov A8 %A9
FormatStr "FLD_GuildIsland1='%s'" %GUILDNAME
Mov A2 %A9
WriteValueSql "TBL_GUILDISLANDS" %A2 "FLD_GuildIsland1,FLD_CurrentBid1" %A8
goto @GiveIsland1First
#elsesay
Sorry you do not have {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints.\
<Try Again/@FirstBidIsland1>\
[@GiveIsland1First]
#ACT
INC N6 %N1 ;Adds This amount and overwrites previous bid for the area.
FormatStr "FLD_GuildIsland1='%s'" %GUILDNAME
Mov A8 %A9
FormatStr "FLD_CurrentBid1='%s'" %N6
UPDATEVALUESQL "TBL_GUILDISLANDS" %A8 %A9
MapTing DGI12906 0 160 230
MapTing DGI12907 0 160 230
#SAY
Congratulations. You have just purchased GuildIsland1 for {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints.\
<Go Back/@GuildAreaMain>\
<Thanks/@Exit>\\
[@NewBidIsland1]
#ACT
MOV N1 0
MOV A6 0
MOV N6 0
#SAY
How much would you like to bid for GuildIsland1?\
<Enter Amount/@@NewBid1>\
<Go Back/@GuildAreaMain>\
<Exit/@Exit>\\
[@@NewBid1]
#ACT
MOV N1 %INPUTSTR
GOTO @CHECKNewBID1
[@CHECKNewBID1]
#SAY
Are you sure you wish to bid {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints?\
<Yes/@ContNewBidding1>\
<Go Back/@GuildAreaMain>\
<Exit/@Exit>\\
[@ContNewBidding1]
#ACT
FormatStr "FLD_GUILD='%s'" %GUILDNAME
ReadValueSql "TBL_GUILD" %A9 "FLD_GUILD,FLD_POINTS" [@CHECKNEWGUILDPOINTS1]
[@CHECKNEWGUILDPOINTS1()]
#ACT
MOV A3 %ARG(1)
MOV N3 %ARG(2)
GOTO @CHECKNEWPOINTS1
[@CHECKNEWPOINTS1]
#IF
ESMALL N3 %N1
#ACT
DEC N3 %N1
FormatStr "'%s',%s" %GUILDNAME 0
Mov A8 %A9
FormatStr "FLD_GUILD='%s'" %GUILDNAME
Mov A2 %A9
UpdateValueSql "TBL_GUILD" %A2 "FLD_GUILD,FLD_POINTS" %A8
INC N6 %N1 ;Adds This amount and overwrites previous bid for the area.
FormatStr "FLD_GuildIsland1='%s'" %GUILDNAME
Mov A8 %A9
FormatStr "FLD_CurrentBid1='%s'" %N6
UPDATEVALUESQL "TBL_GUILDISLANDS" %A8 %A9
MapTing DGI12906 0 160 230
MapTing DGI12907 0 160 230
#SAY
Congratulations. You have just purchased GuildIsland1 for {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints.\
<Go Back/@GuildAreaMain>\
<Thanks/@Exit>\\
#elsesay
Sorry you do not have {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints.\
Or your Bid of {FCOLOR/11}<$OUTPUT(N1)>{FCOLOR/12} GuildPoints is lower than {FCOLOR/11}<$OUTPUT(D1)>{FCOLOR/12} Current Bid of GuildPoints.\
<Try Again/@NewBidIsland1>\
im sure there is something missing that checks if u have correct Points .
would anyone who has uded this system please be able to help me?