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-23-2001, 02:42 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Selling Srings

This still doesn't work! Why?!?!

// Created By Rob Getashu
if (created) {
// Initialize the attributes
showcharacter;
setcharprop #3,head0.gif;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
}
if (playerchats&&strequals(#c,sell lumber)) {
playersrupees=playerrupees+strtofloat(#s(lumber));
setstring client.lumber,;
setstring server.gavelumber,strtofloat(#s(client.lumber);
setplayerprop #c,You sold #s(client.lumber) logs.;
}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #2  
Old 10-23-2001, 02:56 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
lol you said 'playersrupees' when in fact it's 'playerrupees'
__________________

-=Shard IceFire=-
Reply With Quote
  #3  
Old 10-23-2001, 03:10 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
and u need to use client.lumber all the time not just lumber for the string!!
Reply With Quote
  #4  
Old 10-23-2001, 03:30 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Quote:
Originally posted by Shard_IceFire
lol you said 'playersrupees' when in fact it's 'playerrupees'
lol
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #5  
Old 10-23-2001, 03:31 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
you really should start using players[0].rupees
Reply With Quote
  #6  
Old 10-23-2001, 03:39 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
fix the problem lol
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #7  
Old 10-23-2001, 03:40 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
look at my other post lol
Reply With Quote
  #8  
Old 10-23-2001, 03: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
also you need to delete the client.lumber string after you tell the player how much wood he sold!!!
Reply With Quote
  #9  
Old 10-23-2001, 03:42 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
I mean fixed the script and post it. I'm lazy right now.
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #10  
Old 10-23-2001, 03:43 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
Re: Selling Srings

// Created By Rob Getashu
if (created) {
// Initialize the attributes
showcharacter;
setcharprop #3,head0.gif;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
}
if (playerchats&&strequals(#c,sell lumber)) {
players[0].rupees+=strtofloat(#s(client.lumber));
setstring server.gavelumber,strtofloat(#s(client.lumber);
setplayerprop #c,You sold #s(client.lumber) logs.;
setstring client.lumber,;
}

try this
Reply With Quote
  #11  
Old 10-23-2001, 03:45 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
ok brb
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #12  
Old 10-23-2001, 03:50 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Re: Re: Selling Srings

Quote:
Originally posted by btedji
// Created By Rob Getashu
if (created) {
// Initialize the attributes
showcharacter;
setcharprop #3,head0.gif;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
}
if (playerchats&&strequals(#c,sell lumber)) {
players[0].rupees+=strtofloat(#s(client.lumber));
setstring server.gavelumber,strtofloat(#s(client.lumber);
setplayerprop #c,You sold #s(client.lumber) logs.;
setstring client.lumber,;
}

try this
This script doesn't work at all. Should I add my tree script so you can see it?
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #13  
Old 10-23-2001, 03:54 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
Re: Re: Re: Selling Srings

Quote:
Originally posted by SSRobgeta


This script doesn't work at all. Should I add my tree script so you can see it?
maybe, go ahead and post it if you want
Reply With Quote
  #14  
Old 10-23-2001, 03:56 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Here ya go.


// Created By Rob Getashu
if (created) {
showcharacter;
setcharani appletree4,
}
if (actionlumberjacking && this.lumberhit<=100){
this.lumberhit++;
message #v(this.lumberhit/100*100)%
}
if (this.lumberhit=20) {
setcharani appletreecut,
}
if (this.lumberhit=100) {
setani lumber,;
setstring lumber,#v(strtofloat(#s(lumber))+3);
sleep .5;
hide;
say2
Wow this is valueable #b
lumber!#b
You now have #s(lumber).;
this.lumberhit=0
}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #15  
Old 10-23-2001, 04:02 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
if you use lumber for a string in the tree npc you need to use lumber in the sell npc and if you use client.lumber in the sell npc you need to use client.lumber in the tree npc i have to go for now so cya
Reply With Quote
  #16  
Old 10-23-2001, 06:01 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Re: Selling Srings

Quote:
Originally posted by SSRobgeta
This still doesn't work! Why?!?!

// Created By Rob Getashu
if (created) {
// Initialize the attributes
showcharacter;
setcharprop #3,head0.gif;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
}
if (playerchats&&strequals(#c,sell lumber)) {
playersrupees=playerrupees+strtofloat(#s(lumber));
setstring client.lumber,;
setstring server.gavelumber,strtofloat(#s(client.lumber);
setplayerprop #c,You sold #s(client.lumber) logs.;
}
setstring server.gavelumber,strtofloat(#s(client.lumber);<--you forgot something
should be:
setstring server.gavelumber,strtofloat(#s(client.lumber));

playersrupees=playerrupees+strtofloat(#s(lumber));
and this should be
playerrupees=playerrupees+strtofloat(#s(lumber));

and if u set:
setstring client.lumber,;
to nothing
setplayerprop #c,You sold #s(client.lumber) logs.;
after it can't be right too
__________________
No Webhost at the moment

Last edited by TDO2000; 10-23-2001 at 06:05 AM..
Reply With Quote
  #17  
Old 10-23-2001, 08:00 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Ok it works, but there is a slight error. Every other time I say sell lumber and I have no lumber... It says sold 1 log adn gives me 1 rupee. Heres what I have.

// Created By Rob Getashu
if (created) {
// Initialize the attributes
showcharacter;
setcharprop #3,head0.gif;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
}
if (playerchats&&strequals(#c,sell lumber)) {
playerrupees=playerrupees+strtofloat(#s(lumber));
setstring server.gavelumber,strtofloat(#s(client.lumber));
setstring client.lumber,;
say2 You sold #s(lumber) logs.;
setstring lumber,#v(strtofloat(#s(lumber))=0)
}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #18  
Old 10-23-2001, 08:10 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
are you not listening to me?? use client.lumber all the time and not just lumber for the string!!!
Reply With Quote
  #19  
Old 10-23-2001, 06:24 PM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
can you fix it for me?
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #20  
Old 10-23-2001, 09:04 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 SSRobgeta
can you fix it for me?
i fixed it 90% post the gani and the way to cut the lumber (the axe)
and il fix it
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #21  
Old 10-23-2001, 10:11 PM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
What is the differents.. between the 2.. script wise.. they do the same thing
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #22  
Old 10-24-2001, 02:28 AM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Wow I don't need help lol I fixed it
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
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:13 PM.


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