adding fame points

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
i whana make a script so u can change items in fp i tryed this script but it work's only 1 time , i mean from fp 0 it takes the ring and inc my fp with 500 , but after , when i try to change second ring he only takes the ring and doesnt inc the fp ... any ideeas on how can i make it add extra 500 for every ring it takes ?
[@divring]
#IF
CHECKITEM DivineRing(rust)
#SAY
ok gime the rust
#ACT
TAKECHEcKITEM DivineRing(rust)
MOV D4 %P9
INC D4 500
SETFAME %D4

break
 

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
In that script P9 contains nothing... first you have to put something into it by running the

#IF
CheckFame

This will put your current FP's into the Variable P9.
 
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
my allmost finished script :

[@Eclipsering]
#IF
CHECKFAME
CHECKITEM EclipseRing(rust)
#ACT
TAKECHEcKITEM eclipsering(rust)
MOV D4 %P9
INC D4 500
SETFAME %D4
#Say
Your current FamePoints are {FCOLOR/10}<$output(D4)>{FCOLOR/12} \ \ \
<back/@rust>
#elseact
break
#elsesay
U dont have the required item

the only bug is that he gives fp even if u dont have the ring in bag .. everytime i click on eclipsering it gives me 500 fp
 
Upvote 0

mapadale

Guest
my allmost finished script :

[@Eclipsering]
#IF
CHECKFAME
CHECKITEM EclipseRing(rust)
#ACT
TAKECHEcKITEM eclipsering(rust) <--- This should be TAKEITEM
MOV D4 %P9
INC D4 500
SETFAME %D4
#Say
Your current FamePoints are {FCOLOR/10}<$output(D4)>{FCOLOR/12} \ \ \
<back/@rust>
#elseact
break
#elsesay
U dont have the required item

the only bug is that he gives fp even if u dont have the ring in bag .. everytime i click on eclipsering it gives me 500 fp
Have a look...........
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
write an 1 behind

checkitem xyz 1

take xyz 1

u dont need takeitem or takecheckitem ...take is enough. takecheckitem u need only if u work with varaibles

in ur case

#if
checkitem eclipsering(rust) 1
#act
take eclipsering(rust) 1
FP PART HERE.....
 
Upvote 0

Amenovis

Golden Oldie
Golden Oldie
Loyal Member
Jan 9, 2006
1,105
0
143
Germany
[@Eclipsering]
#IF
CheckFame
#ACT
Mov N4 %P9
Goto @fpcheck1

[@fpcheck1]
#if
ELarge N4 500 (here he check if u have 500 fp point minimum u dont need it u need for item buy with fp script)
Checkitem EclipseRing(rust) 1
#act
Take EclipseRing(rust) 1
Dec N4 500 (also for buy thats why dec in ur case u would use INC )
SetFame %N4
#Say
Your current FamePoints are {FCOLOR/10}<$output(D4)>{FCOLOR/12} \ \ \
<back/@rust>
#elseact
break
#elsesay
U dont have the required item

That way should work but normaly ever use #say before u use #act sometimes it dont work if u use #act infront of #say but ask me not why... i dunno
 
Last edited:
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
write an 1 behind

checkitem xyz 1

take xyz 1

u dont need takeitem or takecheckitem ...take is enough. takecheckitem u need only if u work with varaibles

in ur case

#if
checkitem eclipsering(rust) 1
#act
take eclipsering(rust) 1
FP PART HERE.....

ty that work's
 
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
i have a problem with selling staff for fp .. im trying this script

[@rose]
#IF
CheckFame 200
#ACT
Mov D4 %P9
DEC D4 200
give rose 1
setfame %D4
#say
Your curent FamePoints are {FCOLOR/10}<$output(D4)>{FCOLOR/12} \\
<Back/@sellitm>
#elsesay
You dont have the required FamePoits
#elseact
break

script works fine but after i try use the npc again the server dc's and i get this error at rungate
 

Attachments

  • untitled.JPG
    untitled.JPG
    213.8 KB · Views: 156
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
hmmm same problem at this script

[@fireball]

#say
<level 6/@lvl6>\


[@lvl6]

#if
checklevel 22
checkfame
CHKMAGICLEVEL fireball 5
large D4 14800
#act
Mov D4 %P9
Dec D4 14800
hlscriptcmd changemaglevel fireball 6
setfame %D4
break

#say
congratulation you made the fireball level 6

#elsesay
u dont have enought famepoints or level
#elseact
break

this is for upgrade the spell from 5 to 6 paying fp , got same problem everything works but after i use it the server get's the error from screeny when i try to use any other npc
 
Upvote 0

kyeron

LOMCN Veteran
Veteran
Loyal Member
Sep 28, 2008
296
1
45
timisoara
ok probem solved .. if u ever try to make a scrip never put the same name's in #call function with the [@blabla] exemple

[@BLABLA]
#CALL [System\spelllevel.txt] @BLABLA <-- this should never be like this ... use BLABLA_1 or anything else .. just not BLABLA cos then u will probably have same problem as i did

hope this is the right reason cos i dont whant to say something wrong but this resolved my problem
 
Last edited:
Upvote 0

Falador

Dedicated Member
Dedicated Member
May 13, 2007
221
1
64
;Skill Leveler
[@LevelSKill()]
#IF
;-----------------------------------Check Item------------------
Checkitem xxxxxxx 1
checkgold 100000
#ACT
Mov A0 %ARG(1)
#ELSEACT
goto @wrongitem
break
#IF
ChKMAGICLEVEL %A0 4
#ACT
Take xxxxxxx 1
take gold 100000
HLSCRIPTCMD CHANGEMAGLEVEL %A0 5
goto @main_finished
break
#IF
CHKMAGICLEVEL %A0 3
#ACT
Take xxxxxxx 1
take gold 100000
HLSCRIPTCMD CHANGEMAGLEVEL %A0 4
goto @main_finished
#ELSEACT
goto @WrongLevel
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,966
110
310
Stoke, UK
For ease of tracking problems, you need to make sure that all your Headers have meaningful names.

The general convention I try to stick to when using CALLS is..

[@Main]
#SAY
<[ CALL SCRIPT ]/@CALLWhatScriptDoes>\

[@CALLWhatScriptDoes]
#CALL [Location] @WhatScriptDoesMain

Then inside the CALLed script.. I prefix every header with WhatScriptDoes..

This way, you can call your scripts from any NPC without fear of errors like that one mentioned above..

So.. for example.

Integral NPC calls loads of scripts..

[@Main]
#SAY
<[ Spells ]/@CALLIntSpells>\
<[ Pets ]/@CALLIntPets>\

[@CALLIntSpells]
#CALL [Location] @IntSpellsMain

[@CALLIntPets]
#CALL [Location] @IntPetsMain

Now, in the Integral Spells Script you would use the following..

[@IntSpellsMain]
blah blah blah

[@IntSpellsCheckInt]
blah blah blah

[@IntSpellsTakeInt]
blah blah blah

[@IntSpellsUpgSpell]
blah blah blah

You will never make a mistake again.
 
Upvote 0