Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-10-2002, 07:16 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
I need help with money system

Hi, can anyone help me with this?
I knwo there aint any commands like playerlaysgoldrupee or stuff,
btu i need it to work that if you lay an goldrupee client.string will reduce with 100 and same with toehr rupees

heres what i got so far
[CODE]// NPC made by GÄ$†£Ÿ -Testing-
if (playerenters) {
toweapons -moneysystem;
}
if (timeout) {
playerrupees=client.money;
}
timeout=0.05;
if (timeout) {
if (playerlaysgoldrupee&&client.money>99) {
client,money-=100;
}
if (playerlaysredrupee&&client.money>29) {
client,money-=30;
}
if (playerlaysgreenrupee&&client.money>0) {
client,money-=1;
}
if (playerlaysbluerupee&&client.money>4) {
client,money-=5;
}
}CODE]


ANd its not gonna use putNPC cuz its p2p and it will cause lag with gralat system, so is there a way to do it? that if you drop 1 gold rupee client.money will reduce with 100


Thanks
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #2  
Old 03-10-2002, 08:03 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Har har, most stuff in there is weird. IM me.
Reply With Quote
  #3  
Old 03-10-2002, 08:13 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Quote:
Originally posted by Slaktmaster
Har har, most stuff in there is weird. IM me.
Affirmative.
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #4  
Old 03-10-2002, 10:46 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Re: I need help with money system

Quote:
Originally posted by mhermher
Hi, can anyone help me with this?
I knwo there aint any commands like playerlaysgoldrupee or stuff,
btu i need it to work that if you lay an goldrupee client.string will reduce with 100 and same with toehr rupees

heres what i got so far
[CODE]// NPC made by GÄ$?£? -Testing-
if (playerenters) {
toweapons -moneysystem;
}
if (timeout) {
playerrupees=client.money;
}
timeout=0.05;
if (timeout) {
if (playerlaysgoldrupee&&client.money>99) {
client,money-=100;
}
if (playerlaysredrupee&&client.money>29) {
client,money-=30;
}
if (playerlaysgreenrupee&&client.money>0) {
client,money-=1;
}
if (playerlaysbluerupee&&client.money>4) {
client,money-=5;
}
}CODE]


ANd its not gonna use putNPC cuz its p2p and it will cause lag with gralat system, so is there a way to do it? that if you drop 1 gold rupee client.money will reduce with 100


Thanks
you could use:

timeout=.05;
setstring client.money,#v(playerrupees);
Reply With Quote
  #5  
Old 03-10-2002, 11:18 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Re: Re: I need help with money system

Quote:
Originally posted by amonrabr


you could use:

timeout=.05;
setstring client.money,#v(playerrupees);
Nope, its ok I fixed it with help from Archaon, the mighty!
hehe
But he didnt fix it eh kinda fixed theh laf, i fixed it 100%
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #6  
Old 03-11-2002, 03:47 PM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Re: I need help with money system

Quote:
Originally posted by mhermher
Hi, can anyone help me with this?
I knwo there aint any commands like playerlaysgoldrupee or stuff,
btu i need it to work that if you lay an goldrupee client.string will reduce with 100 and same with toehr rupees

heres what i got so far
[CODE]// NPC made by GÄ$†£Ÿ -Testing-
if (playerenters) {
toweapons -moneysystem;
}
if (timeout) {
playerrupees=client.money;
}
timeout=0.05;
if (timeout) {
if (playerlaysgoldrupee&&client.money>99) {
client,money-=100;
}
if (playerlaysredrupee&&client.money>29) {
client,money-=30;
}
if (playerlaysgreenrupee&&client.money>0) {
client,money-=1;
}
if (playerlaysbluerupee&&client.money>4) {
client,money-=5;
}
}CODE]


ANd its not gonna use putNPC cuz its p2p and it will cause lag with gralat system, so is there a way to do it? that if you drop 1 gold rupee client.money will reduce with 100


Thanks
dont get what you are trying to achieve
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #7  
Old 03-11-2002, 04:37 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Re: Re: I need help with money system

Quote:
Originally posted by neomaximus2k


dont get what you are trying to achieve
if you wouldn't have said it, i would have...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #8  
Old 03-12-2002, 12:47 AM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Re: I need help with money system

Quote:
Originally posted by mhermher
Hi, can anyone help me with this?
I knwo there aint any commands like playerlaysgoldrupee or stuff,
btu i need it to work that if you lay an goldrupee client.string will reduce with 100 and same with toehr rupees

heres what i got so far
[CODE]// NPC made by GÄ$†£Ÿ -Testing-
if (playerenters) {
toweapons -moneysystem;
}
if (timeout) {
playerrupees=client.money;
}
timeout=0.05;
if (timeout) {
if (playerlaysgoldrupee&&client.money>99) {
client,money-=100;
}
if (playerlaysredrupee&&client.money>29) {
client,money-=30;
}
if (playerlaysgreenrupee&&client.money>0) {
client,money-=1;
}
if (playerlaysbluerupee&&client.money>4) {
client,money-=5;
}
}CODE]


ANd its not gonna use putNPC cuz its p2p and it will cause lag with gralat system, so is there a way to do it? that if you drop 1 gold rupee client.money will reduce with 100


Thanks
all i see is that you got a client variable increasing whenever the player drops money, for that i cant see a reason for
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
  #9  
Old 03-12-2002, 02:26 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
me either

please tell more
__________________
[signature]insert here[/signature]
Reply With Quote
  #10  
Old 03-12-2002, 06:12 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Quote:
Originally posted by screen_name
me either

please tell more
Its for non hacking, wel they can hack it if they hack the string.
But the most gralat 'hackers' use trainers, so this will make them not able to
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #11  
Old 03-12-2002, 09:21 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
just do this


NPC Code:


if (isweapon) {
timeout=.1;
}

if (timeout) {
if (playerrupees>strtofloat(#s(client.rupees))) {
setstring client.rupees,0;
playerrupees=client.rupees;
setstring server.hackedrupees.#a,Had:#v(playerrupees) Supposed to Have: #s(client.rupees);
} else {
playerrupees=strtofloat(#s(client.rupees));
}
timeout=.1;
}

__________________
[signature]insert here[/signature]

Last edited by screen_name; 03-12-2002 at 10:53 PM..
Reply With Quote
  #12  
Old 03-12-2002, 10:17 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Quote:
Originally posted by screen_name
just do this


[code]

if (isweapon) {
timeout=.1;
}

if (timeout) {
if (playerrupees>strtofloat(#s(client.rupees))) {
setstring client.rupees,0;
playerrupees=client.rupees;
setstring server.hackedrupees.#a,Had:#v(playerrupees) Supposed to Have: #s(client.rupees);
} else {
playerrupees=strtofloat(#s(client.rupees));
}
timeout=.1;
hehe, thanks, but...
mine isnt a hacker detector, its a anti hack program, anywasy Thanks for your idea I might use it
}
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #13  
Old 03-12-2002, 10:54 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
whoops

i always forget to add the [/code] tag

o well

anyways, this will tell if they hack

and whenever they lay a rupee down then it will subtract it from the client.rupees string
__________________
[signature]insert here[/signature]
Reply With Quote
  #14  
Old 03-12-2002, 10:59 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Quote:
Originally posted by screen_name
whoops

i always forget to add the [/code] tag

o well

anyways, this will tell if they hack

and whenever they lay a rupee down then it will subtract it from the client.rupees string
it wont do that :P
But with 2 NPcs i can do a hack detector AND a anti hack
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #15  
Old 03-12-2002, 11:16 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Dont ya need to use the strtofloat command to test the value of a string?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.