![]() |
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.; } |
lol you said 'playersrupees' when in fact it's 'playerrupees'
|
and u need to use client.lumber all the time not just lumber for the string!!
|
Quote:
|
you really should start using players[0].rupees
|
fix the problem lol
|
look at my other post lol
|
also you need to delete the client.lumber string after you tell the player how much wood he sold!!!
|
I mean fixed the script and post it. I'm lazy right now.
|
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 |
ok brb
|
Re: Re: Selling Srings
Quote:
|
Re: Re: Re: Selling Srings
Quote:
|
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 } |
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 :D i have to go for now so cya
|
Re: Selling Srings
Quote:
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 :) |
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) } |
are you not listening to me?? use client.lumber all the time and not just lumber for the string!!!
|
can you fix it for me?
|
Quote:
and il fix it |
What is the differents.. between the 2.. script wise.. they do the same thing
|
Wow I don't need help lol I fixed it
|
| All times are GMT +2. The time now is 12:03 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.