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 09-23-2001, 11:17 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
Help on A Script

Ok this script is used to sell Lumber that you have. But when I say sell lumber it gives you your money, but if you say it again it takes money?!?! Can Someone heklp who understands String and var more than me?

// 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)) {
lumber = strtofloat(#s(lumber));
playerrupees = lumber;
setstring lumber,#v(lumber);

lumber = strtofloat(#s(lumber))=0;
setstring lumber,#v(lumber);
setstring client.lumber,#s(lumber);
setstring server.gavelumber,#v(strtofloat(#s(server.gavelumb er))=0);

}
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #2  
Old 09-23-2001, 11:20 PM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
well your problem is where is says playerruppes = lumber
that means say you have 10 lumber
you say it you get 10g and no more lumber
so you say it again when you have no lumber your gralat will = 0 because that was the lumber number
try using playerrupees = playerrupees+lumber
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #3  
Old 09-23-2001, 11:26 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
Ok thx let me try that
__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
Reply With Quote
  #4  
Old 09-23-2001, 11:34 PM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Ugh...or dont be so nasty about it and use playerrupees += lumber;
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #5  
Old 09-23-2001, 11:37 PM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
if (playerchats&&strequals(#c,sell lumber)) {
this.lumber = strtofloat(#s(client.lumber));
playerrupees+=this.lumber;
setstring client.lumber,;
setstring server.gavelumber,#v(this.lumber);
setplayerprop #c,You sold #v(this.lumber) logs;
}
like that? (i added a setplayer .. u can take that out.. the other part wasnt needed .. u can take out the server.gavelumber. keep it if ur recording how much the last player sold last)
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
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 10:01 PM.


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