npc integrals problem

Unico

Dedicated Member
Dedicated Member
Dec 15, 2007
230
1
64
Code:
[@Main] 
#ACT
   FormatStr "FLD_USERID='%s'" %USERID
   ReadValueSql  "TBL_RELATPOINT"  %A9  "FLD_POINT,FLD_OK,FLD_USERID"  [@Point_Loading]

[@Point_Loading()]
  #IF
  #ACT
      mov       D1   %ARG(1)   
      mov       D2   %ARG(2)  
      mov       A8   %ARG(3)  
      FormatStr "FLD_USERID='%s'" %USERID  
      mov       A0   %A9

  #IF                       
      Equal  A8   ""       
  #ACT
      FormatStr "%s,%s,%s," 0 0 0    
      mov A1 %A9
      FormatStr "'%s'" %USERID  
      AddStr A1 %A9
      WriteValueSql  "TBL_RELATPOINT" %A0 "FLD_POINT,FLD_CURRENTPOINT,FLD_OK,FLD_USERID" %A1      
      break
  #SAY
Tu cuenta {FCOLOR/10}<$OUTPUT(A8)>{FCOLOR/12} contiene {FCOLOR/1}<$OUTPUT(D1)>{FCOLOR/12} puntos integrales!\\
#ELSESAY
Su ID {FCOLOR/10}<$OUTPUT(A8)>{FCOLOR/12} Tiene {FCOLOR/1}<$OUTPUT(D1)>{FCOLOR/12} puntos integrales!\

{FCOLOR/10}Hola este es el panel de puntos integrales ,visitalo para saber que ofrecemos. 
{FCOLOR/12}Aquí podras alquilar fabulosos aliados,comprar items y muchas mas cosas{FCOLOR/12}\
{FCOLOR/10}Elige entre lo que tengo aquí.{FCOLOR/12}\ \

<Helmets/@helmet>\
<armas/@armas>\
<Collares/@collar>\
<Rings/@ring>\
<Brazaletes /@brazas>\
<Otros objetos/@otros>\

[@helmet]
#SAY
Helmets:\
<DarkHelmet [500 P.Integrales]/@Point_Buy(DarkHelmet),500,1)>\

<Volver/@comprarItems>\



[@otros]
#SAY
<Dumplings(HP) [50 Integral]/@Point_Buy(Dumplings(HP),50,1)>\
<Dumplings(SC) [50 Integral]/@Point_Buy(Dumplings(SC),50,1)>\
<Dumplings(DC) [50 Integral]/@Point_Buy(Dumplings(DC),50,1)>\
<Dumplings(MC) [50 Integral]/@Point_Buy(Dumplings(MC),50,1)>\
<Dumplings(MP) [50 Integral]/@Point_Buy(Dumplings(MP),50,1)>\
<RevivalWater [150 Integral]/@Point_Buy(RevivalWater,150,1)>\
<RedRose(Revive) [100 Integral]/@Point_Buy(RedRose,100,1)>\

[@Point_Buy()]
#IF
#ACT
Mov A1 %ARG(1)
Mov D0 %ARG(2)
Mov D1 %ARG(3)
#IF
HLSCRIPTCMD CHECKPOINT %D0
#ACT
HLSCRIPTCMD SETPOINT - %D0
give %A1 %D1
#SAY
Usted cambio sus pi por el item deseado {FCOLOR/10}<$OUTPUT(D1)>-<$OUTPUT(A1)>{FCOLOR/12}.\
Usted ha gastado {FCOLOR/10}<$OUTPUT(D0)>{FCOLOR/12}P.Integral. \
<Volver/@main>
#elsesay
No tiene suficientes integrales para comprar este item,\

i have this npc but have small problem

i have 1150 integrals but when i go to buy 1 item the npc say me : you don't have integrals
what is wrong in npc?
 

Falador

Dedicated Member
Dedicated Member
May 13, 2007
221
1
64
Hello,

check please your SQL database and look, have you this : TBL_Relatpoint?
And you now that you charakter need Integral points ^^ edit in the TBL the Integralpoints on you charakter and i think you can buy on your npc ^^

LG
Fala

this is my old Ip-system: (this is 1 script from 20 ^^)
[@Exequipment]
{
#SAY
_ is celebrates the server to promote successfully, partial Equipment {FCOLOR/10} 8 folds {FCOLOR/12} to exchange. \ \
Below {FCOLOR/10} Here exchanges Goods. . {FCOLOR/12} \ \
<MiscItems/@misc>\
;<Weapon/@weaponclass> <Synthesis/@synthesisclass>\
;<Warrior/@soldierclass> <Sorcerer/@Masterclass> <Taoist priest/@taoistpriestclass>\

[@misc]
#say
<ScrollOfKnowledge [240 Integral/@point_buy(ScrollOfKnowledge,240,1)>\
<Return/@Exequipment>
[@weaponclass]
#say
<ChaosBlade [240 Integral]/@Point_Buy(ChaosBlade,240,1)>\
<DragonSlayer [1200 Integral]/@Point_Buy(DragonSlayer,1200,1)>\
<BattleFan [1600 Integral]/@Point_Buy(BattleFan,1600,1)> \\
<Return/@Exequipment>

[@synthesisclass]
#if
checklevel 40
#say
<Dumplings(DC) [2 Integral]/@Point_Buy(Dumplings(DC),2,1)>\
<RevivalWater [1 Integral]/@Point_Buy(RevivalWater,1,1)>\
<EvilSpiritSpar [1 Integral]/@Point_Buy(EvilSpiritSpar,1,1)>\
<Goldbar [100 Integral]/@Point_Buy(Goldbar,100,1)>\\
#if
checklevel 38
#say
The new book {FCOLOR/10} 8 folds {FCOLOR/12} to exchange! Comes to trade first, expired does not make up \\
Warrior new book \
<Interchange(*) [160 Integral]/@Point_Buy(Interchange(*),160,1)>\
<Beacon(*) [240 Integral]/@Point_Buy(Beacon(*),240,1)>\
<MeteorShower(*) [320 Integral]/@Point_Buy(MeteorShower(*),320,1)>\
Sorcerer new book \
<GtFrozeEarth(*) [160 Integral]/@Point_Buy(GtFrozeEarth(*),160,1)>\
<ChainLight(*) [240 Integral]/@Point_Buy(ChainLight(*),240,1)>\
Taoist priest new book\
<Celestrial(*) [160 Integral]/@Point_Buy(Celestrial(*),160,1)>\
Moves the flower to meet the jade (rare book) {FCOLOR/10} the present opening {FCOLOR/12} \
The wonderful shade does not have the trace (rare book) {FCOLOR/10} the present opening {FCOLOR/12} \
#if
#say
<HolyShaman [240 Integral]/@Point_Buy(HolyShaman,240,1)>\
<BlackIronHelmet [240 Integral]/@Point_Buy(BlackIronHelmet,240,1)>\
<FireBoots [240 Integral]/@Point_Buy(FireBoots,240,1)> \\
<Return/@Exequipment>

[@soldierclass]
#say
<HeroicGlove [240 Integral]/@Point_Buy(HeroicGlove,240,1)>\
<GoldenBrace [480 Integral]/@Point_Buy(GoldenBrace,480,1)>\
<Abstention [640 Integral]/@Point_Buy(Abstention,640,1)>\
<Return/@Exequipment>

[@Masterclass]
#say
<HeartRing [240 Integral]/@Point_Buy(HeartRing,240,1)>\
<DemonicBells [240 Integral]/@Point_Buy(DemonicBells,240,1)>\
<HorseRing [320 Integral]/@Point_Buy(HorseRing,320,1)>\
<Return/@Exequipment>

[@taoistpriestclass]
#say
<TitanRing [80 Integral]/@Point_Buy(TitanRing,80,1)>\
<UniverseNeck [320 Integral]/@Point_Buy(UniverseNeck,320,1)>\
<Dumplings(A) [800 Integral]/@Point_Buy(Dumplings(A),800,1)>\\
<Return/@Exequipment>

[@Point_Buy()]
#ACT
Mov A1 %ARG(1)
Mov N3 %ARG(2)
Mov N4 %ARG(3)
Delaygoto [local] 5 @waiter
#say
_{FCOLOR/10}Please later, the system is processing the data...{FCOLOR/12}\

[@waiter]
#act
FormatStr "FLD_USERID='%s'" %USERID
ReadValueSql "TBL_RELATPOINT" %A9 "FLD_POINT,FLD_USERID" [@buyer]

[@buyer()]
#ACT
mov D0 %ARG(1)
mov A4 %ARG(2)
#IF
Equal A4 ""
#say
a4 leer
#IF
elarge D0 %N3
#ACT
FormatStr "FLD_USERID='%s'" %USERID
mov A6 %A9
DEC D0 %N3
mov D8 %D0
FormatStr "FLD_POINT='%s'" %D8
UPDATEVALUESQL "TBL_RELATPOINT" %A6 %A9
give %A1 %N4
#SAY
Has succeeded completes got {FCOLOR/1} <$OUTPUT(A1) > {FCOLOR/12} . \ \
You have spent {FCOLOR/10} <$OUTPUT(N3) > {FCOLOR/12} Integral.You also surplus {FCOLOR/1} <$OUTPUT(D8) > {FCOLOR/12} Integral! \\
<Exit/@exit>\\

#ELSESAY
{FCOLOR/1} You dont have enough points {FCOLOR/10} \\
<Exit/@exit>\\
}
 
Last edited:
Upvote 0