Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Mushrooms Picking (https://forums.graalonline.com/forums/showthread.php?t=23783)

lordhelmut 02-15-2002 07:22 AM

Mushrooms Picking
 
Umm I scripted mushroom picking a while back as a way for players new to the server to make money. Its like 20 mushrooms for 1g so its not the best route to go lol. Anyways, my mushrooms dont grow back very well with more than one player in the level...If someone can help I would appreciate it

if(playerenters){
timeout=3;
}
if(created){
this.power=3;
}
if (actionfreeze&&this.power>0) {
playersprite=19;
this.power-=1;
message Keep Pulling!;
}
if (actionfreeze&&this.power<=0&&(strtofloat(#s(mushr ooms))<50)) {
hide;
freezeplayer .9;
setani gotmushroom,;
message ;
setstring mushrooms,#v(strtofloat(#s(mushrooms))+1);
timeout=10;
}
if (actionfreeze&&(strtofloat(#s(mushrooms))>=50)) {
say2 You cant carry anymore!;
}
if(timeout){
this.power=6;
show;
}

Saga2001 02-15-2002 08:00 AM

Re: Mushrooms Picking
 
Quote:

Originally posted by lordhelmut
Umm I scripted mushroom picking a while back as a way for players new to the server to make money. Its like 20 mushrooms for 1g so its not the best route to go lol. Anyways, my mushrooms dont grow back very well with more than one player in the level...If someone can help I would appreciate it

if(playerenters){
timeout=3;
}
if(created){
this.power=3;
}
if (actionfreeze&&this.power>0) {
playersprite=19;
this.power-=1;
message Keep Pulling!;
}
if (actionfreeze&&this.power<=0&&(strtofloat(#s(mushr ooms))<50)) {
hide;
freezeplayer .9;
setani gotmushroom,;
message ;
setstring mushrooms,#v(strtofloat(#s(mushrooms))+1);
timeout=10;
}
if (actionfreeze&&(strtofloat(#s(mushrooms))>=50)) {
say2 You cant carry anymore!;
}
if(timeout){
this.power=6;
show;
}

A lot of times with non-p2p what happens is since there is no npc server, the player leaves the level, and the timeout dies. What I would personally suggest is use some save[] vars and save the last player's id than if a new playerenters, with a new id, it immediatly shows, itherwise it says hidden and resets the timeout to show.

lordhelmut 02-15-2002 10:08 AM

Re: Re: Mushrooms Picking
 
Quote:

Originally posted by Saga2001


A lot of times with non-p2p what happens is since there is no npc server, the player leaves the level, and the timeout dies. What I would personally suggest is use some save[] vars and save the last player's id than if a new playerenters, with a new id, it immediatly shows, itherwise it says hidden and resets the timeout to show.

english?

Python523 02-15-2002 10:12 AM

try using timereverywhere in the script and if you want the mushrooms to grow more depending on the ammount of players, do if (playercount>1) or somthing like that

lordhelmut 02-15-2002 10:14 AM

not sure about that playercount part cuz i dont know what to do but thanks, I forget about timereverywhere somtimes lol :)

Python523 02-15-2002 10:19 AM

lol, it happens to a lot of people, sometimes I forget certain attributes of the players like #C# and stuff like that

I'm sure playerscount works, I've tried it online before like this:

if (created) {timeout=.05;}
if (timeout) {timeout=.05;}
if (timeout&&playerscount==1)
setlevel2 onlinestartlocal.graal,30,30;
}
and that worked perfectly

lordhelmut 02-15-2002 10:54 AM

i know how it works, i dont know how to incorporate it into mushroom picking

Androk2k1 02-15-2002 11:14 AM

Mashroom picking?! I made that! I DID! I am gonna find thread which i posted and put it here!

lordhelmut 02-15-2002 11:16 AM

Quote:

Originally posted by Androk2k1
Mashroom picking?! I made that! I DID! I am gonna find thread which i posted and put it here!
LOL, no this is Mushroom picking, not Mashroom picking. And I know I saw your thread. I didnt even make it, the co owner *who doesnt read the forums* also had the idea since we already had mushrooms on babylon.

Androk2k1 02-15-2002 11:18 AM

Oh yeah... sorry... That's when i got my idea too.. after I saw custom mushrooms on yur server... NM then =)

I can give you script if you need it it's really simple...

Androk2k1 02-15-2002 11:22 AM

NM... you have better script... I need to adjust some stuff in mine, like sprite of player and that's it... agrh...

ArchOwl 02-15-2002 11:31 AM

i bet with the help of some friends i could make a really good base for mushroom picking :P

lordhelmut 02-15-2002 12:02 PM

Quote:

Originally posted by Androk2k1
Oh yeah... sorry... That's when i got my idea too.. after I saw custom mushrooms on yur server... NM then =)

I can give you script if you need it it's really simple...

LOL! thats kinda funny actually :)


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

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