Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Dumb script that won't work (https://forums.graalonline.com/forums/showthread.php?t=27337)

Googi 04-12-2002 05:39 AM

Dumb script that won't work
 
NPC Code:

if (created) {
setimg door.png;
setshape 1,32,32;
mine.onea=0;
}
if (playerchats&&strequals(#c,rent mine 1)&&playergralat<5&&mine.onea=0){
playergralat-=5;
tokenize #a;
mine.onea=1;
say2 You have mine 1 for 30 minutes;
timeout=1800;
}
if (playerchats&&strequals(#c,rent mine 1)&&mine.onea=1){
say2 That mine is rented already;
}
if (playerchats&&strequals(#c,rent mine 1)&&playergralat<5&&mine.onea=0){
say2 You need 5g to rent a mine!;
}
if (playertouchsme&&(#a,#t)&&mine.onea=1){
setlevel2 rentmine2.nw,6,7;
}



I keep getting the "this mine is already rented" message.

Slaktmaster 04-12-2002 06:07 AM

Re: Dumb script that won't work
 
NPC Code:

if (created) {
setimg door.png;
setshape 1,32,32;
mine.onea=0;
}
if (playerchats&&strequals(#c,rent mine 1)&&playergralats=>5&&mine.onea=0){
playergralats-=5;
setstring this.oneaowner,#a;
mine.onea=1;
say2 You have mine 1 for 30 minutes;
timeout=1800;
} else if (playerchats&&strequals(#c,rent mine 1)&&playergralats<5&&mine.onea=0){
say2 You need 5g to rent a mine!;
} else if (playerchats&&strequals(#c,rent mine 1)&&mine.onea=1){
say2 That mine is rented already;
}
if (playertouchsme&&(#s(this.oneaowner),#a)&&mine.one a=1){
setlevel2 rentmine2.nw,6,7;
}


Googi 04-12-2002 06:50 AM

Well, there were some bugs, I got them all fixed except that when I rent the mine it still won't take the 5g.

Dustey 04-12-2002 08:50 AM

Quote:

Originally posted by Googi
Well, there were some bugs, I got them all fixed except that when I rent the mine it still won't take the 5g.
for the gralats its not "playergralat"

it is

"playerrupees" i think that is spelt right if that dont work put another p on rupees

[edit] sometime if your stuck look at npc and player vars in the list to the side;) [/edit]

Googi 04-12-2002 09:25 AM

Okay, got it working.

Slaktmaster 04-12-2002 02:41 PM

Quote:

Originally posted by Kaimetsu
Surely the G2K1 NAT would:

a) Be able to script a mine-renting system in 5 seconds.
b) Not accept a script from someone as inexpert as you.

So why bother?

You are just too right. ;)

Spanko 04-12-2002 06:52 PM

Quote:

Originally posted by Kaimetsu
Surely the G2K1 NAT would:

a) Be able to script a mine-renting system in 5 seconds.
b) Not accept a script from someone as inexpert as you.

So why bother?

Hey, at least, unlike most people here, he makes the effort of attempting to script it.

Spanko 04-12-2002 07:50 PM

Quote:

Originally posted by Kaimetsu


For which I give him credit. However, I feel it only charitable to point out the futility of his actions.

Yes, but it did sound rather discouraging. If someone had said to you when you first started programming "It's futile, someone else could do it better then you" wouldn't you feel slightly discouraged?

Googi 04-12-2002 11:48 PM

Quote:

Originally posted by Kaimetsu


For which I give him credit. However, I feel it only charitable to point out the futility of his actions.

I don't care about dumb Graal2K1 staff positions, I just want to get the damn mines up.

Beisdes, if I wanted to submit this for a staff position, I would have gotten a private scripter to de-bug this for me, and I would have tried to get the rock wall script that way.

Saga2001 04-13-2002 07:02 AM

Graal2001_NAT account is taken by a bugs admin. ?!?!? :confused:

Googi 04-13-2002 08:26 AM

Quote:

Originally posted by Kaimetsu

b) Not accept a script from someone as inexpert as you.

True, but it has a slightly higher chance then endlessly bugging the admins.

Googi 04-13-2002 08:24 PM

Quote:

Originally posted by Kaimetsu

I doubt it :-/

Key word was slightly

Neonight 04-16-2002 07:20 AM

Re: Dumb script that won't work
 
NPC Code:

if (created) {
setimg door.png;
setshape 1,32,32;
mine.onea=0;
}
if (playerchats&&strequals(#c,rent mine 1)&&playergralat<5&&mine.onea=0){
playergralat-=5;
tokenize #a;
mine.onea=1;
say2 You have mine 1 for 30 minutes;
timeout=1800;
}
if (playerchats&&strequals(#c,rent mine 1)&&mine.onea=1){
say2 That mine is rented already;
}
if (playerchats&&strequals(#c,rent mine 1)&&playergralat<5&&mine.onea=0){
say2 You need 5g to rent a mine!;
}
if (playertouchsme&&(#a,#t)&&mine.onea=1){
setlevel2 rentmine2.nw,6,7;
}



&&playergralat=>5;
< is less than
> is more than

Cybnext_Design 04-16-2002 07:55 AM

Quote:

Originally posted by Saga2001
Graal2001_NAT account is taken by a bugs admin. ?!?!? :confused:
He got the account like a minute before I was going to get it.:(
Atleast I happen to be an NPC Maker.


All times are GMT +2. The time now is 10:07 AM.

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