- Aug 28, 2008
- 453
- 4
- 65
Ok i no for a fact that no one has ever done this before.
I searched every where for information on it but after hours and hours of translating i finaly worked it out.
This is a 100 % legitimate first time never seen before release.
so any one who posts that they have seen this before is a lier.
This is 100% my own work and no one elses.
Basicaly i started a house rental system and i wanted the players to manage there own rental system.
This script allows you to charge the player per 7 days.
in this case is 250 playercash for 7 days.
every day the remaining number of days remaining counts down and when they are on 0 days it warned them to renew there rental.
if they dont it evicts them from there house.
This goes in to the Qmanage
This bit is the script for the NPC in side your house or where ever you want to put it to start the rental process
In your C:\mirserver\M2Server\Envir\MapQuest_def
you will have to make a.txt file for each house
house1
house2
house3 etc etc
also 1.txt
2.txt
3.txt etc etc
a a house.txt where all houses rented will be stored.
This will be my last release as i see no point in releasing stuff just to be heckled at
I searched every where for information on it but after hours and hours of translating i finaly worked it out.
This is a 100 % legitimate first time never seen before release.
so any one who posts that they have seen this before is a lier.
This is 100% my own work and no one elses.
Basicaly i started a house rental system and i wanted the players to manage there own rental system.
This script allows you to charge the player per 7 days.
in this case is 250 playercash for 7 days.
every day the remaining number of days remaining counts down and when they are on 0 days it warned them to renew there rental.
if they dont it evicts them from there house.
This goes in to the Qmanage
Code:
#IF
CHECKNAMELIST house15.txt
#ACT
GOTO @checkdays
BREAK
#IF
CHECKNAMELIST house14.txt
#ACT
GOTO @checkdays
BREAK
#IF
CHECKNAMELIST house13.txt
#ACT
GOTO @checkdays
BREAK
#IF
CHECKNAMELIST house12.txt
#ACT
GOTO @checkdays
BREAK
#IF
CHECKNAMELIST house11.txt
#ACT
GOTO @checkdays
BREAK
#ELSEACT
GOTO @nht
[@nht]
#IF
CHECKNAMELIST House.txt
#ACT
GOTO @iownahouse
BREAK
#ELSEACT
SET [251] 0
SET [252] 0
SET [253] 0
SET [254] 0
SET [255] 0
SET [256] 0
SET [257] 0
SET [258] 0
SET [259] 0
SET [260] 0
SET [261] 0
SET [262] 0
SET [263] 0
SET [264] 0
SET [265] 0
DELNAMELIST House14.txt
DELNAMELIST House13.txt
DELNAMELIST House12.txt
DELNAMELIST House11.txt
DELNAMELIST House10.txt
DELNAMELIST House9.txt
DELNAMELIST House8.txt
DELNAMELIST House7.txt
DELNAMELIST House6.txt
DELNAMELIST House5.txt
DELNAMELIST House4.txt
DELNAMELIST House3.txt
DELNAMELIST House2.txt
DELNAMELIST House1.txt
GOTO @435
[@iownahouse]
#IF
CHECKNAMELIST House14.txt
#ACT
SET [264] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House13.txt
#ACT
SET [263] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House12.txt
#ACT
SET [262] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House11.txt
#ACT
SET [261] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House10.txt
#ACT
SET [260] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House9.txt
#ACT
SET [259] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House8.txt
#ACT
SET [258] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House7.txt
#ACT
SET [257] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House6.txt
#ACT
SET [256] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House5.txt
#ACT
SET [255] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House4.txt
#ACT
SET [254] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House3.txt
#ACT
SET [253] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House2.txt
#ACT
SET [252] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#IF
CHECKNAMELIST House1.txt
#ACT
SET [251] 1
SENDMSG 6 "Your house has been unlocked and ready for your use"
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @435
BREAk
#ELSEACT
GOTO @
[@checkdays]
#ACT
Var Integer Human RentalDays 0
LoadVar Human RentalDays ../QuestDiary/Variables/Integral.txt
GOTO @checkdays4
[@checkdays4]
#IF
CHECKNAMEDATELIST ..\MapQuest_def\7.txt = 0 P0 P1 1
#ACT
CalcVar HUMAN Rentaldays = 7
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @nht
BREAK
#IF
CHECKNAMEDATELIST ..\MapQuest_def\7.txt = 1 P0 P1 1
#ACT
DELNAMEDATELIST ..\MapQuest_def\7.txt
ADDNAMEDATELIST ..\MapQuest_def\6.txt
CalcVar HUMAN Rentaldays = 6
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @nht
BREAK
#IF
CHECKNAMEDATELIST ..\MapQuest_def\6.txt = 2 P0 P1 1
#ACT
DELNAMEDATELIST ..\MapQuest_def\6.txt
ADDNAMEDATELIST ..\MapQuest_def\5.txt
CalcVar HUMAN Rentaldays = 5
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @nht
BREAK
#IF
CHECKNAMEDATELIST ..\MapQuest_def\5.txt = 3 P0 P1 1
#ACT
DELNAMEDATELIST ..\MapQuest_def\5.txt
ADDNAMEDATELIST ..\MapQuest_def\4.txt
CalcVar HUMAN Rentaldays = 4
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @nht
BREAK
#IF
CHECKNAMEDATELIST ..\MapQuest_def\4.txt = 4 P0 P1 1
#ACT
DELNAMEDATELIST ..\MapQuest_def\4.txt
ADDNAMEDATELIST ..\MapQuest_def\3.txt
CalcVar HUMAN Rentaldays = 3
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @nht
BREAK
#IF
CHECKNAMEDATELIST ..\MapQuest_def\3.txt = 5 P0 P1 1
#ACT
DELNAMEDATELIST ..\MapQuest_def\3.txt
ADDNAMEDATELIST ..\MapQuest_def\2.txt
CalcVar HUMAN Rentaldays = 2
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @nht
BREAK
#IF
CHECKNAMEDATELIST ..\MapQuest_def\2.txt = 6 P0 P1 1
#ACT
DELNAMEDATELIST ..\MapQuest_def\2.txt
ADDNAMEDATELIST ..\MapQuest_def\1.txt
CalcVar HUMAN Rentaldays = 1
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
GOTO @nht
BREAK
#IF
CHECKNAMEDATELIST ..\MapQuest_def\1.txt = 7 P0 P1 1
#ACT
DELNAMEDATELIST ..\MapQuest_def\0.txt
ADDNAMEDATELIST ..\MapQuest_def\evict.txt
DELNAMELIST ..\MapQuest_def\House.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
SET [251] 0
SET [252] 0
SET [253] 0
SET [254] 0
SET [255] 0
SET [256] 0
SET [257] 0
SET [258] 0
SET [259] 0
SET [260] 0
SET [261] 0
SET [262] 0
SET [263] 0
SET [264] 0
SET [265] 0
DELNAMELIST House14.txt
DELNAMELIST House13.txt
DELNAMELIST House12.txt
DELNAMELIST House11.txt
DELNAMELIST House10.txt
DELNAMELIST House9.txt
DELNAMELIST House8.txt
DELNAMELIST House7.txt
DELNAMELIST House6.txt
DELNAMELIST House5.txt
DELNAMELIST House4.txt
DELNAMELIST House3.txt
DELNAMELIST House2.txt
DELNAMELIST House1.txt
GOTO @nht
BREAK
This bit is the script for the NPC in side your house or where ever you want to put it to start the rental process
Code:
[@main]
#ACT
Var Integer Human RentalDays 0
GOTO @please
[@please]
#IF
ISADMIN
#ACT
GOTO @resetvariable
#ELSEACT
GOTO @nope
[@nope]
#IF
CHECKVAR Human RentalDays > 0
#ACT
GOTO @remain
BREAK
#ELSESAY
Welcome home <$USERNAME>.\
You currently have <$HUMAN(RentalDays)> days left on your account.\
This house costs £2.50 a week.\
Once your remaining days = 0 you will loose your home and the\
Apartment if you have completed the Quest.These are the terms and\
conditions of this Agreement.If you do not agree then please leave\
now.\
If you agree then feel free to top up your days.\ \
<Add additional days to my Home./@adddays>
[@adddays]
#SAY
Ok <$USERNAME>.\
you have <$HUMAN(Rentaldays)> days remaining on a House\
To purchase more days for a house please select the 7 day topup.\
please note you can only add 7 days at a time.\
and you can only top up once your house is on 0 days remaining.\ \
<Add 7 days/@start5> 250 GameCash\
[@start5]
#IF
CHECKGAMEGOLD > 249
#ACT
GAMEGOLD - 250
GOTO @add6
#ELSESAY
Sorry <$USERNAME>.\
It would appear that you do not have enough GameCash to add 7\
days to your home.\
Please arrange a GameCash topup before your house runs out.\ \
<Exit/@exit>
[@add6]
#ACT
ADDNAMELIST ..\MapQuest_def\House.txt
ADDNAMELIST ..\MapQuest_def\House11.txt
ADDNAMEDATELIST ..\MapQuest_def\7.txt
CalcVar HUMAN Rentaldays = 7
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
SENDMSG 6 "You now have <$HUMAN(Rentaldays)> rental days remaining"
SENDMSG 0 "%s has claimed ownership of House11.Congratulation"
SET [261] 1
BREAK
CLOSE
#ELSESAY
Sorry <$USERNAME>.\
It would appear that you already have days remaining on your account.\
You still have <$HUMAN(RentalDays)> days left.\
You can only pay when it is on 0 days left atm.\
[@remain]
#SAY
Welcome home <$USERNAME>.\
You currently have <$HUMAN(RentalDays)> days left on your agreement.\
Please remeber that when you are on your last day (day 0)\
you must add another 7 days to your account of you will loose your\
house.If you had an apartment you will also loose that to.\
Each day ends at 12:00 AM (GMT).Thats midnite every night.\
So make sure you get your topups well in advance.\ \
<I won't forget/@exit>
[@resetvariable]
#SAY
Would you like to reset your variables ?. (paul only)\ \
<Yes please reset/@reset>\
<Main Script/@nope>
[@reset]
#ACT
CalcVar HUMAN Rentaldays = 0
SaveVar HUMAN Rentaldays ..\QuestDiary\Variables\Integral.txt
BREAK
CLOSE
In your C:\mirserver\M2Server\Envir\MapQuest_def
you will have to make a.txt file for each house
house1
house2
house3 etc etc
also 1.txt
2.txt
3.txt etc etc
a a house.txt where all houses rented will be stored.
This will be my last release as i see no point in releasing stuff just to be heckled at
Last edited: