Message system

howie

LOMCN Veteran
Veteran
Loyal Member
Jun 7, 2003
312
2
94
UK
Mauldor found a chinese script, I have translated it and played with it to work.
It needs more experimenting with it ie what happens when it is full etc.
It has 20 pages
2 docs needed and an NPC
eg
==============================================
merchant.txt
GuestBook 0 447 400 Messenger 0 84
==============================================

QuestDiary\System\GuestBook.txt:
;add this
[content]

[user]

[count]
num=0

[check]
chk=0

[maxnum]
max=60
==============================================
Envir\market_def\Guestbook-0.txt:
;add this
[@main]
#SAY
{FCOLOR/14} [ Welcome to the Mates message system ]\
{FCOLOR/12} [ Attention ]:Please type in your message content, do not exceed (20 letters)\ \
<[I want to leave a message]/@@liuyan>\
<[Examine any messages]/@dqly(1)>\\


[@@liuyan]
#ACT
LoadValue D0 "QuestDiary\System\GuestBook.txt" [check] [chk]
MOV A0 %INPUTSTR

#IF
Equal D0 1
#SAY
_[ Reminder ]:Others are using the message this, please try later ! !\\
_<[Message]/@@liuy>\
_<[Exit]/@exit>\
#ACT
break

#IF
!Checkgold 1000
#SAY
_Your dont have enough gold ! !\\
_<[Back]/@main>\
_<[Exit]/@exit>\
#ACT
break

#IF
Equal A0 ""
#SAY
_[ Reminder ]:You have not left a message l ! !\\
_<[Back]/@main>\
_<Exit/@exit>\
#ACT
break
#ELSEACT
goto @savegb

[@savegb]
#ACT
SaveValue "QuestDiary\System\GuestBook.txt" [check] [chk] 1
LoadValue D0 "QuestDiary\System\GuestBook.txt" [count] [num]
LoadValue P0 "QuestDiary\System\GuestBook.txt" [maxnum] [max]
inc D0 1
#IF
Large D0 %P0
#ACT
mov D0 1

#IF
#ACT
SaveValue "QuestDiary\System\GuestBook.txt" [count] [num] %D0
SaveValue "QuestDiary\System\GuestBook.txt" [content] [%D0] %A0
SaveValue "QuestDiary\System\GuestBook.txt" [user] [%D0] %USERNAME
SaveValue "QuestDiary\System\GuestBook.txt" [check] [chk] 0
take gold 1000
#SAY
_Thank you for using Mates message services! !\\
_<[Back]/@main>\
_<[Exit]/@exit>\

[@dqly()]
#ACT
mov D1 %ARG(1)
LoadValue D2 "QuestDiary\System\GuestBook.txt" [count] [num]

#IF
large D1 %D2
#SAY
{FCOLOR/14}=====[ Mates message system ]====={FCOLOR/12}\
<[I want to leave a message]/@@liuyan>\
Page<1/@dqly(1)>|<2/@dqly(4)>|<3/@dqly(7)>|<4/@dqly(10)>|<5/@dqly(13)>|<6/@dqly(16)>|<7/@dqly(19)>|<8/@dqly(22)>|<9/@dqly(25)>|<10/@dqly(28)>|<11/@dqly(31)

>|<12/@dqly(34)>|<13/@dqly(37)>|<14/@dqly(40)>|<15/@dqly(43)>|<16/@dqly(46)>|<17/@dqly(49)>|<18/@dqly(52)>|<19/@dqly(55)>|<20/@dqly(58)>\\
This page does not have any messages! !
#ACT
break

#IF
#SAY
{FCOLOR/14}=====[ Mates message system ]====={FCOLOR/12}\
<[I want to leave a message]/@@liuyan>\
Page<1/@dqly(1)>|<2/@dqly(4)>|<3/@dqly(7)>|<4/@dqly(10)>|<5/@dqly(13)>|<6/@dqly(16)>|<7/@dqly(19)>|<8/@dqly(22)>|<9/@dqly(25)>|<10/@dqly(28)>|<11/@dqly(31)

>|<12/@dqly(34)>|<13/@dqly(37)>|<14/@dqly(40)>|<15/@dqly(43)>|<16/@dqly(46)>|<17/@dqly(49)>|<18/@dqly(52)>|<19/@dqly(55)>|<20/@dqly(58)>\\
#ACT
inc D2 1

#IF
small D1 %D2
#ACT
LoadValue A1 "QuestDiary\System\GuestBook.txt" [content] [%D1]
LoadValue B1 "QuestDiary\System\GuestBook.txt" [user] [%D1]
mov P1 %D1
inc D1 1
#SAY
(<$OUTPUT(P1)>) {FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12} ||<$OUTPUT(B1)>\\
#ELSEACT
break

#IF
small D1 %D2
#ACT
LoadValue A2 "QuestDiary\System\GuestBook.txt" [content] [%D1]
LoadValue B2 "QuestDiary\System\GuestBook.txt" [user] [%D1]
mov P2 %D1
inc D1 1
#SAY
(<$OUTPUT(P2)>) {FCOLOR/8}<$OUTPUT(A2)>{FCOLOR/12} ||<$OUTPUT(B2)>\\
#ELSEACT
break

#IF
small D1 %D2
#ACT
LoadValue A3 "QuestDiary\System\GuestBook.txt" [content] [%D1]
LoadValue B3 "QuestDiary\System\GuestBook.txt" [user] [%D1]
mov P3 %D1
#SAY
(<$OUTPUT(P3)>) {FCOLOR/13}<$OUTPUT(A3)>{FCOLOR/12} ||<$OUTPUT(B3)>\\

=============================================





message1.jpg


message2.jpg
 

Inzane

Dedicated Member
Dedicated Member
Feb 10, 2004
32
0
33
Can I just say that it looks a little primative compared to euromir's
 

Demonic

LOMCN VIP
VIP
Dec 1, 2003
1,806
2
165
This is NOT a email system - thin of it as a shoutbox type thing.

The email dont work but I am gonna write a comeplete npc for that very thing until someone (prob me) gets the email working..
 

Ephemera

Dedicated Member
Dedicated Member
Jun 1, 2004
22
0
27
haha i love your attitude Demonic! "until someone (prob me)" haha classic.
 

Demonic

LOMCN VIP
VIP
Dec 1, 2003
1,806
2
165
Well I hate Bugs, I hate waiting for the chinese and i would die of old age waiting for someone else to work it out so ill keep looking until i figure it out - the coding is def in the server, the coding is obiuosly in the client - just finding a way to make the two talk to each other :)
 

howie

LOMCN Veteran
Veteran
Loyal Member
Jun 7, 2003
312
2
94
UK
Inzane said:
Can I just say that it looks a little primative compared to euromir's

At least mauldor, looks, finds, fixes and works hard to help everyone.

What has been your contribution ?

On top of that we are working on Chinese files not Euromir ones.

If that is the kind of attitude we got all the time then why should we bother ?
We can just keep and develope at our own pace and have only ourselves to please.

I agree its crappy, but then so is everything to start of with, all it needs is peeps to develope it more IF and i mean IF they want to use it. !
 

Inzane

Dedicated Member
Dedicated Member
Feb 10, 2004
32
0
33
I already offered my services on Demonic's forums. Im installing my new hd as I type. But i'm an idiot, so what do I know!