Help with script

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
I created an NPC to change Gamepoints to Scrolls. But when I try, it falls CruelDragon. anyone know why?

[@chgtointegral]
{
#if
#say
___{FCOLOR/10}Actualmente dispones de: {FCOLOR/10}<$HLPOINT> Puntos Integrales{FCOLOR/12}\\
En este servicio podras cambiar tus Puntos Integrales a Integrales.\
El valor de cada Integral es el siguiente:\
{FCOLOR/12}{FCOLOR/10} GreenIntegral{FCOLOR/12}={FCOLOR/1}10{FCOLOR/12}Puntos Integrales{FCOLOR/12}\
{FCOLOR/12}{FCOLOR/10} VioletIntegral{FCOLOR/12}={FCOLOR/1}100{FCOLOR/12}Puntos Integrales{FCOLOR/12}\
{FCOLOR/12}{FCOLOR/10} YellowIntegral{FCOLOR/12}={FCOLOR/1}1000{FCOLOR/12}Puntos Integrales{FCOLOR/12}\
{FCOLOR/12}{FCOLOR/10} RedIntegral{FCOLOR/12}={FCOLOR/1}10000{FCOLOR/12}Puntos Integrales{FCOLOR/12}\\
{FCOLOR/12}<[ Obtener GreenIntegral ]/@obtgreen>{FCOLOR/12}\
{FCOLOR/12}<[ Obtener VioletIntegral ]/@obtviolet>{FCOLOR/12}\
{FCOLOR/12}<[ Obtener YellowIntegral ]/@obtyellow>{FCOLOR/12}\
{FCOLOR/12}<[ Obtener RedIntegral ]/@obtred>{FCOLOR/12}\
{FCOLOR/12}<[ Volver ]/@main>{FCOLOR/12}\\

[@obtgreen]
#if
HLSCRIPTCMD CHECKPOINT 10
#act
HLSCRIPTCMD SETPOINT - 10
give GreenIntegral 1
#say
Tienes {FCOLOR/1}<$HLPOINT>{FCOLOR/12} Puntos Integrales!\
Has obtenido {FCOLOR/14}GreenIntegral{FCOLOR/12}\
<[ Continuar canjeando ]/@chgtointegral>\
#ELSESAY
No tienes suficientes {FCOLOR/14}Puntos Integrales{FCOLOR/12}.\\
<[ Volver ]/@main>\\

[@obtviolet]
#if
HLSCRIPTCMD CHECKPOINT 100
#act
HLSCRIPTCMD SETPOINT - 100
give VioletIntegral 1
#say
Tienes {FCOLOR/1}<$HLPOINT>{FCOLOR/12} Puntos Integrales!\
Has obtenido {FCOLOR/14}VioletIntegral{FCOLOR/12}\
<[ Continuar canjeando ]/@chgtointegral>\
#ELSESAY
No tienes suficientes {FCOLOR/14}Puntos Integrales{FCOLOR/12}.\\
<[ Volver ]/@main>\\

[@obtyellow]
#if
HLSCRIPTCMD CHECKPOINT 1000
#act
HLSCRIPTCMD SETPOINT - 1000
give RedIntegral 1
#say
Tienes {FCOLOR/1}<$HLPOINT>{FCOLOR/12} Puntos Integrales!\
Has obtenido {FCOLOR/14}YellowIntegral{FCOLOR/12}\
<[ Continuar canjeando ]/@chgtointegral>\
#ELSESAY
No tienes suficientes {FCOLOR/14}Puntos Integrales{FCOLOR/12}.\\
<[ Volver ]/@main>\\

[@obtviolet]
#if
HLSCRIPTCMD CHECKPOINT 10000
#act
HLSCRIPTCMD SETPOINT - 10000
give RedIntegral 1
#say
Tienes {FCOLOR/1}<$HLPOINT>{FCOLOR/12} Puntos Integrales!\
Has obtenido {FCOLOR/14}RedIntegral{FCOLOR/12}\
<[ Continuar canjeando ]/@chgtointegral>\
#ELSESAY
No tienes suficientes {FCOLOR/14}Puntos Integrales{FCOLOR/12}.\\
<[ Volver ]/@main>\\

}

Thanks for help
 

mapadale

Guest
It fails because that isn't a king script....

If it's for 3.55CD, then when you HLSCRIPTCMD CHECKPOINT you are asking how many integral points the play has and then when you use HLSCRIPTCMD SETPOINT - you are asking the script to take away those points...

See example below.....

#IF
HLSCRIPTCMD CHECKPOINT 500 ; Checking how many integral points
!HLSCRIPTCMD CHECKRELEVEL 1
checklevel 60
#ACT
HLSCRIPTCMD REINCARNATION
HLSCRIPTCMD CLEAREXP
HLSCRIPTCMD SETPOINT - 500 ;Removes integral points
 
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Look, I have it like in your example, but the cruel dragon fails:
#if
HLSCRIPTCMD CHECKPOINT 1000 <----Cheking how many integral points
#act
HLSCRIPTCMD SETPOINT - 1000 <----Removes points
give RedIntegral 1 <----given object points

mapadale, thanks for help.
 
Upvote 0

Rawwwr

Dedicated Member
Dedicated Member
Feb 27, 2010
198
1
45
Look, I have it like in your example, but the cruel dragon fails:
Is it working or not then? o.o
It's because I had the same prob one time, but when I deleted that npc, and I add a new one with the same script, it worked :D
 
Upvote 0

nicofortune

LOMCN Veteran
Veteran
Aug 13, 2009
340
1
45
yeah its annoying when u make a script and npc dont like it then u delete npc and make new one then for some odd reason it works lol
 
Upvote 0

mapadale

Guest
Ok try the following as a script.

[@main]
#SAY
<[ Violet Integral ]/@violet>\\\

[@violet]
#IF
HLSCRIPTCMD CHECKPOINT 500
#ACT
HLSCRIPTCMD SETPOINT - 500
GIVE VioletIntegral 1

I know it's identical to your own, but it's building it from a basic script and make sure you have VioletIntegral in th DB spelt as VioletIntegral. Let me know how it goes and we will go further into it.
 
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Mapadale your script works, but I still do not understand why mine is not. My script is basic too, only contains text. That's odd.
I have the same problem with change FP to Integral points, and change Integral Points to FP...
 
Last edited:
Upvote 0

mapadale

Guest
Where do you have the script stored, in which folder in the Envir?

As looking at your script you are using call tags { }

They should only be used if you have the script in the Quest Diary and you need to use the following from another script in Market

#CALL [SystemScripts\Integral.txt] @main

However you have the @main command as well, which doesn't reference to anything.
 
Last edited:
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
[@main]

#say
___{FCOLOR/10} Actualmente dispones de :<$HLPOINT> Puntos integrales{FCOLOR/12}\\

_______________{FCOLOR/1}[{FCOLOR/12} Menu de servicio {FCOLOR/1}]{FCOLOR/12} \\
<Como obtener Puntos integrales/@obtener> \\
_______________{FCOLOR/1}[{FCOLOR/12} Cambiar Puntos {FCOLOR/1}]{FCOLOR/12} \\
<Cambiar Integrales/@chgintegral>\
<Cambiar Puntos Integrales por Integrales/@chgtointegral>\
<Cambiar Puntos Integrales por Puntos de Fama/@chgfama>\
<Cambiar Puntos de Fama por Puntos Integrales/@chgtofama>\\

[@obtener]
#CALL [IntegralScripts\1Explicacion.txt] @obtener

[@chgintegral]
#CALL [IntegralScript\2CambIntegral.txt] @chgintegral

[@chgtointegral]
#CALL [IntegralScript\3CambiaraIntegral.txt] @chgtointegral

[@chgfama]
#CALL [IntegralScript\4CambiarIntegral.txt] @chgfama

[@chgtofama]
#CALL [IntegralScript\5CambiarIntegral.txt] @chgtofama

This NPC is in Market_Def and referred calls to scripts that are in QuestDiary\IntegralScripts\.....
 
Upvote 0

lina

LOMCN Veteran
Veteran
Loyal Member
Jul 28, 2010
283
5
45
Poland
You can use my script as well, took me two days ;]
You only need to translate it, shall i release it?



EDIT: Could some 1 explain to me where in king i could find a option to set a certain scrool to spawn a monster? Big Thanks.



[@main]
#sAY
{FCOLOR/13}-------------Intense GamePoints System-------------{FCOLOR/1}\
{FCOLOR/13}I can help you manage your game points system{FCOLOR/1}\
{FCOLOR/13}In here you can exchange GamePoints Scrools!{FCOLOR/1}\
{FCOLOR/13}The order of GamePoints Scrools: {FCOLOR/1}\ \

{FCOLOR/10}GamePoints(S) = 5 GamePoints{FCOLOR/1}\
{FCOLOR/10}GamePoints(M) = 10 GamePoints{FCOLOR/1}\
{FCOLOR/10}GamePoints(L) = 25 GamePoints{FCOLOR/1}\
{FCOLOR/10}GamePoints(X) = 50 GamePoints{FCOLOR/1}\ \

{FCOLOR/10}5 GamePoints = GamePoints(S){FCOLOR/1}\
{FCOLOR/10}10 GamePoints = GamePoints(M){FCOLOR/1}\
{FCOLOR/10}25 GamePoints = GamePoints(L){FCOLOR/1}\
{FCOLOR/10}50 GamePoints = GamePoints(X){FCOLOR/1}\ \
<Exchange Scrools/@1>\ \

<Leave/@Exit>\


[@1]
#SAY
{FCOLOR/13}In here you can exchange GamePoints Scrools of{FCOLOR/1}\
{FCOLOR/13}Different sizes. Different sizes will give {FCOLOR/1}\
{FCOLOR/13}Different amount of GamePoints {FCOLOR/1} \
{FCOLOR/13}Exchange Scrools:{FCOLOR/1}\ \

<GamePoints(S)/@2(5)>\
<GamePoints(M)/@22(10)>\
<GamePoints(L)/@33(25)>\
<GamePoints(X)/@44(50)>\ \

{FCOLOR/13}Exchange GamePoints To Scrools:{FCOLOR/1}\ \

<5 GamePoints/@rafal1>\
<10 GamePoints/@rafal2>\
<25 GamePoints/@rafal3>\
<50 GamePoints/@rafal4>\ \

<Leave/@exit>\ \


[@rafal1]
#IF
checkcmd CHECKUSERJF 5
#ACT
actcmd SETUSERJF - 5
GIVE GamePoints(S)
#ELSESAY
{FCOLOR/1}You do not have the GamePoints!{FCOLOR/10}\ \

<OK/@EXIT>\




[@rafal2]
#IF
checkcmd CHECKUSERJF 10
#ACT
actcmd SETUSERJF - 10
GIVE GamePoints(M)
#ELSESAY
{FCOLOR/1}You do not have the GamePoints!{FCOLOR/10}\ \

<OK/@EXIT>\


[@rafal3]
#IF
checkcmd CHECKUSERJF 25
#ACT
actcmd SETUSERJF - 25
GIVE GamePoints(L)
#ELSESAY
{FCOLOR/1}You do not have the GamePoints!{FCOLOR/10}\ \

<OK/@EXIT>\


[@rafal4]
#IF
checkcmd CHECKUSERJF 50
#ACT
actcmd SETUSERJF - 50
GIVE GamePoints(X)
#ELSESAY
{FCOLOR/1}You do not have the GamePoints!{FCOLOR/10}\ \

<OK/@EXIT>\



[@2()]
#act
MOV D5 %ARG(1)

GOTO @3

[@3]
#if
checkitem GamePoints(S) 1
#act
actcmd setuserjf + %D5
take GamePoints(S) 1
#ELSESAY
{FCOLOR/1}You do not have the Scrool!{FCOLOR/10}\ \

<Leave/@Exit>






[@22()]
#act
MOV D5 %ARG(1)

GOTO @99

[@99]
#if
checkitem GamePoints(M) 1
#act
actcmd setuserjf + %D5
take GamePoints(M) 1
#ELSESAY
{FCOLOR/1}You do not have the Scrool!{FCOLOR/10}\ \

<Leave/@Exit>




[@33()]
#act
MOV D5 %ARG(1)

GOTO @88

[@88]
#if
checkitem GamePoints(L) 1
#act
actcmd setuserjf + %D5
take GamePoints(L) 1
#ELSESAY
{FCOLOR/1}You do not have the Scrool!{FCOLOR/10}\ \

<Leave/@Exit>






[@44()]
#act
MOV D5 %ARG(1)

GOTO @77

[@77]
#if
checkitem GamePoints(X) 1
#act
actcmd setuserjf + %D5
take GamePoints(X) 1
#ELSESAY
{FCOLOR/1}You do not have the Scrool!{FCOLOR/10}\ \

<Leave/@Exit>
 
Last edited:
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Thank you so much, but i need put this script in menu ''d'' , when i do this script with comand #CALL , it not works.
PD:lina, very nice script.
 
Upvote 0

Rawwwr

Dedicated Member
Dedicated Member
Feb 27, 2010
198
1
45
Thank you so much, but i need put this script in menu ''d'' , when i do this script with comand #CALL , it not works.
PD:lina, very nice script.

If you want to add it to the D menu, just copy it on the Mir3GuideBook :)
 
Upvote 0

mapadale

Guest
It's your #CALL in the Mir3GuideBook that's not working and not your actual script, it can be very hit and miss with the #CALL command and best way to get around it, is to create the script directly into the Mir3GuideBook by using flags.

@Lina this is for 3.55 and not king.
 
Upvote 0

Shyfx

Dedicated Member
Dedicated Member
May 19, 2007
247
106
89
[@obtener]
#CALL [IntegralScripts\1Explicacion.txt] @obtener

Try changing one of the "@"'s
 
Upvote 0

lina

LOMCN Veteran
Veteran
Loyal Member
Jul 28, 2010
283
5
45
Poland
Alright sorry for that, btw when i have used a direct script in mirguidebook in king, the <blabla/@elo> script did not take me to [@elo] for some reason therefore i cannot spawn monster in the D Menu. I decided to make a scroll for that however i dont know which file is corresponding in setting a script for that. Click scrool > action where can i find that basicly?
 
Upvote 0