script help

Desolation Mir2 (Med Rate Server)

paul.obrien

LOMCN Veteran
Veteran
Aug 28, 2008
453
4
45
ive made 20 house (private houses)
im using a NPC to sell the houses but after the player has bought the house they just get teleported to the first house on the list.
Was wondering if CHECKNAMELISTPOSITION actually works or have i done something wrong.

ive created a folder in Envir called houserent and a .txt inside it called House.
once a house is sold it adds the name to the House.txt file np
but when it checks the list to see which house is yours it just teleports you to house 1


[@main]
#SAY
Welcome <$USERNAME> would you like to rent a house?.\ \
<Yes please/@chkh>\
<No ThankYou/@exit>

[@chkh]
#IF
CHECKNAMELIST ../HouseRent/House.txt
#ACT
goto @gotahouse

#ELSEACT
goto @buyer1st

[@buyer1st]
#IF
CHECKNAMELISTPOSITION ../HouseRent/House.txt1
#ACT
mapmove house1
#ELSEACT
goto @house2

[@house2]
#IF
CHECKNAMELISTPOSITION ../HouseRent/House.txt2
#ACT
mapmove house2
#ELSEACT
goto @house3

[@house3]
#IF
CHECKNAMELISTPOSITION ../HouseRent/House.txt3
#ACT
mapmove house3
#ELSEACT
goto @house4

[@house4]
#IF
CHECKNAMELISTPOSITION../HouseRent/House.txt4
#ACT
mapmove house4
#ELSEACT
goto @rent


[@rent]
#SAY
Would you like to rent a house ?\\
<yes/@rental>\
<No ThankYou/@exit>\

[@rental]
#SAY
A house costs 200 million gold to buy.\ \
Would you like to continue?\ \

<Yes/@rent5000>\
<no/@exit>

[@rent5000]
#IF
CHECKGOLD 200000000
#ACT
TAKE GOLD 200000000
Addnamelist ../HouseRent/House.txt

#ELSESAY
Sorry you don't have 200 million gold to buy a house.

#SAY
Gratz ..you have just bought a house


[@gotahouse]
#SAY
You already have a house.\ \

<Go to your house now/@telehome>\
<Exit/@Exit>

[@telehome]
#IF
CHECKNAMELISTPOSITION ../HouseRent/House.txt1
#ACT
MAPMOVE house1
#ELSEACT
goto @home2

[@home2]
#IF
CHECKNAMELISTPOSITION ../HouseRent/House.txt2
#ACT
MAPMOVE house2
#ELSEACT
goto @home3

[@home3]
#IF
CHECKNAMELISTPOSITION ../HouseRent/House.txt3
#ACT
MAPMOVE house3
#ELSEACT
goto @home4

[@home4]
#IF
CHECKNAMELISTPOSITION ../HouseRent/House.txt4
#ACT
MAPMOVE house4