FP check

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
so i know how (with colys help) fp works

first
#if
CheckFame
#act
Mov P4 %P9
Inc P4 XYZ
SetFame %P4
SysMsg "blahblub"

that part is clear or with Dec for Inc to make it smaller but now my prob

how i make it that i got a spezial answer for check?

i mean example:

#if
CheckFame ZZZ
#act
Mov P4 %P9
Inc P4 XYZ
SetFame %P4
SysMsg"blahblub"
give XXX (//gift for the right famepoints that he have got ZZZ//)

Is that right in that way or totaly wrong ????

greetings

ameno
 
Last edited:

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
ahmm I don't see your problem o.O

#if
CheckFame
#act

this put the FamePoints this the User have atm to P9 and with
P9 you can all Check with

#if
EQUAL P9 10
#act
ec.
 
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
ok better exceple for you ^^...
I hope you understand it ...


Code:
[@MyCheckFunction]
#IF
  CheckFame
#ACT
  Mov N4 %P9
  Goto MyGiveFunction(%N4)

[@MyGiveFunction()]
#ACT
  Mov P1 %ARG(1)
#IF
  EQUAL P1 1
#ACT
 Give XYZ 1
 SysMsg "Bla Blub" 
 Break //Stop the function and go back to caller (MyCheckFunction)
#IF
  EQUAL P1 2
#ACT
 Give XYZ 2
 SysMsg "Bla Blub" 
 Break //Stop the function and go back to caller (MyCheckFunction)
#IF
  EQUAL P1 3
#ACT
 Give XYZ 3
 SysMsg "Bla Blub" 
 Break //Stop the function and go back to caller (MyCheckFunction)
#IF
#ACT
 SysMsg "You don't have Fame... blub"
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
So that way ?

#if
CheckFame
#act
Mov P4 %P9
break
#if
Equal P4 XZY (right)
#act
give XXX ("GIFT")
SysMsg "gz u have the right FP"
#elseact
SysMsg "sorry u havent the needed FP"
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
next question to that part

Large=higher as a number
Equal=must be that number
Smal=smaler as number

?? the prob is i had made the script now to buy famepoints but if ppl click on it they can buy a item for 100k fp with example:50k fp they got the item and have -50 k FP :(

i had change script that way:
[@kelch]
#IF
CheckFame
#ACT
Mov P4 %P9
Goto @kelch1

[@kelch1]
#if
Large P4 5001
#Say
Diesen kannst du als Handelsgut verwenden oder zum Kauf anderer Dinge nutzen zb Titel\
U can use it as Tradingstuff or for Titles\
#act
Dec P4 5000
SetFame %P4
give Kelch
SysMsg "<$USERNAME> Der Kelch wurde dir in Bag gelegt!"
SysMsg "<$USERNAME> The Kelch is in ur bag now!"
break
#elsesay
Du hast nicht genug FP!\
u havent enough FP!\

the prob is now the npc ever say u havent enough FP and i had over 900k FP :( CRYYYYYY

i hope some of u can help its to high for me realy

thx in advance

ameno
 
Last edited:
Upvote 0

Coly

LOMCN Developer
Developer
Mar 31, 2005
1,399
33
195
Germany
naaaa ... P0..P9 is a local var and you can't it give to a other function.
use D or N...

Next you have this :

ELarge : the Command check Equal_and_Large
ESmall : the Command check Equal_and_Small

If you build a check script you need more checks to get a Correct end Value.
On the other hand you must check of 0, is a stupid problem on Mir3 Servers...

..ok for your problem here a fix :

[@kelch]
#IF
CheckFame
#ACT
Mov N4 %P9
Goto @kelch1

[@kelch1]
#if
ELarge N4 5000
#act
Dec N4 5000
SetFame %N4
...
#Say
Diesen kannst du....


have fun ^^
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
lol nur wegen so ne scheiß variablen lol man ey meine nerven *rofl dank dir bist mein held des tages :)

lol only cause a **** varaible lol damn my nerves *rofl thx u u are my hero of the day :)
 
Upvote 0