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 10-01-2001, 05:20 AM
Vinvect Vinvect is offline
Registered User
Join Date: Aug 2001
Location: U.S.A,California,Milpitas,In A House,In Room,On A Seat,On a Computer
Posts: 157
Vinvect is on a distinguished road
Send a message via ICQ to Vinvect Send a message via Yahoo to Vinvect
Red face Read This Plz (A Scripting Question)

How do i do somethin like if i touch a Ball
then if i touch another ball then i go to this house then i say Sell Balls then u get money?
or if u dont get me,
its just like pearl diving like i touch a peral then i go sell them.
but im asking, how do i do the thingy where when i touch the ball then it adds +1 then i touch another ball then it adds +1 again anthen i go to a person who nuys balls then you say sell balls the nu get money corresponding how many balls u get.:grrr:
__________________
==========================
I Script Really Good
&
Looking For A NAT Job
==========================
Quote:
That's like a big lugee!
-Evolution The Movie
Quote:
Ha Ha Ha Give It Up!
-Cyrus From Bomberman
I'm not a Bomy anymore.
I'm a MUTATED BROCLI MONSTER!
(or SIGN MONSTER)
If you make me angry,
I'LL EAT YOU WHOLE!
ME, MUTATED BROCLI MONSTER MASTER
(or SIGN MONSTER)
WILL EAT YOU ALL UP!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Quest Valley Owner
Looking For Staff
Pm Me
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
O.o Still Have My Braen Damaegd o.O


Thanks To Esiah, He Made This For Me!
Thanks Esiah!
Reply With Quote
  #2  
Old 10-01-2001, 05:40 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
well make a string and and each time the player touchs a NPC it hides and adds one to the string
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #3  
Old 10-01-2001, 05:45 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
so somthing like this:

if(playerenters){
setstring balls,0;
}

then in the balls:

if(playertouchsme){
balls = balls + 1;
}

then to sell make a NPC like:

if(playerchats&&(#c,sell balls)){
playerrupees = playerrupees + balls * 2; //to get 2 g for 1 ball
setstring balls,0;
}

just try somthing like that. Im not sure if i did all of it right but thats just off the top of my head
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #4  
Old 10-01-2001, 06:02 AM
Vinvect Vinvect is offline
Registered User
Join Date: Aug 2001
Location: U.S.A,California,Milpitas,In A House,In Room,On A Seat,On a Computer
Posts: 157
Vinvect is on a distinguished road
Send a message via ICQ to Vinvect Send a message via Yahoo to Vinvect
Red face and

and how do i show something like this as a number:
client.bombs
__________________
==========================
I Script Really Good
&
Looking For A NAT Job
==========================
Quote:
That's like a big lugee!
-Evolution The Movie
Quote:
Ha Ha Ha Give It Up!
-Cyrus From Bomberman
I'm not a Bomy anymore.
I'm a MUTATED BROCLI MONSTER!
(or SIGN MONSTER)
If you make me angry,
I'LL EAT YOU WHOLE!
ME, MUTATED BROCLI MONSTER MASTER
(or SIGN MONSTER)
WILL EAT YOU ALL UP!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Quest Valley Owner
Looking For Staff
Pm Me
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
O.o Still Have My Braen Damaegd o.O


Thanks To Esiah, He Made This For Me!
Thanks Esiah!
Reply With Quote
  #5  
Old 10-01-2001, 06:58 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Quote:
Originally posted by ownerofbabylon
so somthing like this:

if(playerenters){
setstring balls,0;
}

then in the balls:

if(playertouchsme){
balls = balls + 1;
}

then to sell make a NPC like:

if(playerchats&&(#c,sell balls)){
playerrupees = playerrupees + balls * 2; //to get 2 g for 1 ball
setstring balls,0;
}

just try somthing like that. Im not sure if i did all of it right but thats just off the top of my head
LOL SELL BALLS
Reply With Quote
  #6  
Old 10-01-2001, 07:15 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Quote:
Originally posted by Poogle

LOL SELL BALLS
That wasnt funny
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #7  
Old 10-01-2001, 07:16 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
Re: and

Quote:
Originally posted by Vinvect
and how do i show something like this as a number:
client.bombs
explain what u mean
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #8  
Old 10-01-2001, 08:00 AM
Vinvect Vinvect is offline
Registered User
Join Date: Aug 2001
Location: U.S.A,California,Milpitas,In A House,In Room,On A Seat,On a Computer
Posts: 157
Vinvect is on a distinguished road
Send a message via ICQ to Vinvect Send a message via Yahoo to Vinvect
i mean leik
a weapon that shows howmany bombs/balls you have
then when u fire it, it says (say2) leik this
say2 You Have (NUMBER) Balls/Bombs.
e.g/i.e
You Have 9 Balls/Bombs
__________________
==========================
I Script Really Good
&
Looking For A NAT Job
==========================
Quote:
That's like a big lugee!
-Evolution The Movie
Quote:
Ha Ha Ha Give It Up!
-Cyrus From Bomberman
I'm not a Bomy anymore.
I'm a MUTATED BROCLI MONSTER!
(or SIGN MONSTER)
If you make me angry,
I'LL EAT YOU WHOLE!
ME, MUTATED BROCLI MONSTER MASTER
(or SIGN MONSTER)
WILL EAT YOU ALL UP!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Quest Valley Owner
Looking For Staff
Pm Me
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
O.o Still Have My Braen Damaegd o.O


Thanks To Esiah, He Made This For Me!
Thanks Esiah!
Reply With Quote
  #9  
Old 10-01-2001, 08:35 AM
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
Quote:
Originally posted by Vinvect
i mean leik
a weapon that shows howmany bombs/balls you have
then when u fire it, it says (say2) leik this
say2 You Have (NUMBER) Balls/Bombs.
e.g/i.e
You Have 9 Balls/Bombs
say2 You have #v(balls) balls/bombs.

you should use a string for the number of balls so it will save even after the player logs off.
Reply With Quote
  #10  
Old 10-01-2001, 08:35 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
*looks down* well I have 2 balls but here is what you could do:
NPC Code:

//Code by Shard IceFire
if (playertouchsme) {
toweapons Ball count;
}
if (weaponfired) {
say2 You have #s(client.balls) balls!;
}

__________________

-=Shard IceFire=-
Reply With Quote
  #11  
Old 10-01-2001, 09:05 AM
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
Quote:
Originally posted by Shard_IceFire
*looks down* well I have 2 balls but here is what you could do:
NPC Code:

//Code by Shard IceFire
if (playertouchsme) {
toweapons Ball count;
}
if (weaponfired) {
say2 You have #s(client.balls) balls!;
}

thats about as perfect as it gets
Reply With Quote
  #12  
Old 10-01-2001, 09:06 AM
Vinvect Vinvect is offline
Registered User
Join Date: Aug 2001
Location: U.S.A,California,Milpitas,In A House,In Room,On A Seat,On a Computer
Posts: 157
Vinvect is on a distinguished road
Send a message via ICQ to Vinvect Send a message via Yahoo to Vinvect
how do i use strings and how do i put it?
__________________
==========================
I Script Really Good
&
Looking For A NAT Job
==========================
Quote:
That's like a big lugee!
-Evolution The Movie
Quote:
Ha Ha Ha Give It Up!
-Cyrus From Bomberman
I'm not a Bomy anymore.
I'm a MUTATED BROCLI MONSTER!
(or SIGN MONSTER)
If you make me angry,
I'LL EAT YOU WHOLE!
ME, MUTATED BROCLI MONSTER MASTER
(or SIGN MONSTER)
WILL EAT YOU ALL UP!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Quest Valley Owner
Looking For Staff
Pm Me
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
O.o Still Have My Braen Damaegd o.O


Thanks To Esiah, He Made This For Me!
Thanks Esiah!
Reply With Quote
  #13  
Old 10-01-2001, 09:12 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Quote:
how do i use strings and how do i put it?
How do you put what?
__________________

-=Shard IceFire=-
Reply With Quote
  #14  
Old 10-01-2001, 09:14 AM
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
some script for a ball npc

NPC Code:

if(playertouchsme)
{
setstring client.balls,strtofloat(#s(client.balls))+1;
}

Reply With Quote
  #15  
Old 10-01-2001, 09:36 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Quote:
if(playertouchsme)
{
setstring client.balls,strtofloat(#s(client.balls))+1;
}
that probably wouldn't work. If you did that, I believe it would set the string client.balls to +1. What you COULD do is:
NPC Code:

if(playertouchsme) {
this.ballplus=1+strtofloat(#s(client.balls));
setstring client.balls,#v(this.ballplus);
}


Don't get mad at me if I'm wrong but I'm pretty sure that what I said is correct.
__________________

-=Shard IceFire=-
Reply With Quote
  #16  
Old 10-01-2001, 09:41 AM
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
Quote:
Originally posted by Shard_IceFire

that probably wouldn't work. If you did that, I believe it would set the string client.balls to +1. What you COULD do is:
NPC Code:

if(playertouchsme) {
this.ballplus=1+strtofloat(#s(client.balls));
setstring client.balls,#v(this.ballplus);
}


Don't get mad at me if I'm wrong but I'm pretty sure that what I said is correct.
change that to
NPC Code:

if(playertouchsme) {
setstring client.balls,#v(1+strtofloat(#s(client.balls)));
}


its shorter
Reply With Quote
  #17  
Old 10-01-2001, 09:46 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Does that even work? If it does it's not that much shorter...oh well.
__________________

-=Shard IceFire=-
Reply With Quote
  #18  
Old 10-01-2001, 09:46 AM
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
i just like scripting it that way
Reply With Quote
  #19  
Old 10-02-2001, 02:29 AM
fireball_dolphonia fireball_dolphonia is offline
Registered User
Join Date: Sep 2001
Location: Graalistan
Posts: 73
fireball_dolphonia is on a distinguished road
if (playersays(sell balls))balls = balls - (#v(balls);
why wont it take away the balls that u had?
__________________

ages.ccs.com/ccsimages/cat_
Reply With Quote
  #20  
Old 10-02-2001, 02:32 AM
fireball_dolphonia fireball_dolphonia is offline
Registered User
Join Date: Sep 2001
Location: Graalistan
Posts: 73
fireball_dolphonia is on a distinguished road
i made a ball system here it goes
// NPC made by Fireball
if (playerenters) {toweapons *Ball System;
}
if (playertouchsme) {
}
if(playersays(Show Balls))
say2 You have #v(balls) balls;
if(playersays(sell balls)){
playerrupees = playerrupees + balls * 2;
//to get 2 g for 1 ball
setstring balls,0;
balls = balls - (#v,balls);
}
__________________

ages.ccs.com/ccsimages/cat_
Reply With Quote
  #21  
Old 10-02-2001, 03:15 AM
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
Quote:
Originally posted by fireball_dolphonia
i made a ball system here it goes
// NPC made by Fireball
if (playerenters) {toweapons *Ball System;
}
if (playertouchsme) {
}
if(playersays(Show Balls))
say2 You have #v(balls) balls;
if(playersays(sell balls)){
playerrupees = playerrupees + balls * 2;
//to get 2 g for 1 ball
setstring balls,0;
balls = balls - (#v,balls);
}
uhh, that wont work well, so heres a better one:

NPC Code:

if (playerenters) {toweapons *Ball System;}

if(strequals(#c,Show Balls)&&playerchats)
{say2 You have #s(client.balls) balls.; }

if(strequals(#c,Sell Balls)&&playerchats){
players[0].rupees+=#v(strtofloat(#s(client.balls))*2);
//to get 2 g for 1 ball

setstring client.balls,0;
}



this is a better way of doing it
Reply With Quote
  #22  
Old 10-02-2001, 06:30 AM
Vinvect Vinvect is offline
Registered User
Join Date: Aug 2001
Location: U.S.A,California,Milpitas,In A House,In Room,On A Seat,On a Computer
Posts: 157
Vinvect is on a distinguished road
Send a message via ICQ to Vinvect Send a message via Yahoo to Vinvect
Quote:
Originally posted by Poogle

LOL SELL BALLS
STFU
__________________
==========================
I Script Really Good
&
Looking For A NAT Job
==========================
Quote:
That's like a big lugee!
-Evolution The Movie
Quote:
Ha Ha Ha Give It Up!
-Cyrus From Bomberman
I'm not a Bomy anymore.
I'm a MUTATED BROCLI MONSTER!
(or SIGN MONSTER)
If you make me angry,
I'LL EAT YOU WHOLE!
ME, MUTATED BROCLI MONSTER MASTER
(or SIGN MONSTER)
WILL EAT YOU ALL UP!
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Quest Valley Owner
Looking For Staff
Pm Me
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
O.o Still Have My Braen Damaegd o.O


Thanks To Esiah, He Made This For Me!
Thanks Esiah!
Reply With Quote
  #23  
Old 10-02-2001, 06:53 AM
ZORG1986 ZORG1986 is offline
Registered User
ZORG1986's Avatar
Join Date: Jul 2001
Location: England - Yes thats the small Island in Europe that Ownz you all.
Posts: 783
ZORG1986 is on a distinguished road
Send a message via ICQ to ZORG1986 Send a message via AIM to ZORG1986
God damn lots of people all talking about each others balls, im starting to think ive gone to the wrong forum.....
__________________


Zorg (Era Staff) - Contact : [email protected]
Reply With Quote
  #24  
Old 10-02-2001, 07:09 AM
SSj_Link SSj_Link is offline
Registered User
Join Date: Jul 2001
Location: i r live in texas
Posts: 244
SSj_Link is on a distinguished road
Send a message via ICQ to SSj_Link Send a message via AIM to SSj_Link
if (playersays(Plays With Balls)) {
say2 SICK PERSON;
setlevel2jail.graal,x,y;
}

lol


but seriously,
if (playersays(Sell Balls)) {
ball string =0;
}
__________________
-People with my Password: Me (Boozy), Ghostface Killa, bgraven, Freaky Carnie, Dark Warlock, and SoulReaver.
-So they can all post.-

-I hate my account name -

~Old Names: Link, Darklink, Neo, then Boozy when Bravo died. (So some people will recognize me)~

AIM: boozyneo
ICQ: 116030736
Msn: [email protected]
Email: [email protected]


-DANCE SPAM DANCE!- Dark Warlock
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 04:14 PM.


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