Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > NPC Server
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 04-06-2002, 07:01 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Alright!

I have been working on this hat trading npc ever since Bhala decided to mess with it...and now...setgif isn't working...
So I post this qustion here to those of you who are leeter than I. Also its not that setgif needs to be cs because if i setgif door.png; it works fine, i think its not evaluating correctly and the .png is getting chopped or something.

NPC Code:

putnpc2 aimx,aimy,{
if (created) {
setshape 1,48,48;
setgifpart hat#v(this.item).png,96,0,48,48;
}
if (playertouchsme) {
hatc = strtofloat(#s(hatc#v(this.item)))+1;
setstring client.hatc#v(this.item),#v(hatc);
savelog2 hat-log.txt, +hat: #v(this.item) at (#v(x),#v(y)) in #L from #s(this.layer);
destroy;
}
};



I know its in the setgif cause it works fine with showimg and also another thing, setimg doesn't work and those places on the image with the setgifpart are correct...everything is setting right cept the setgif...any suggestions?
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #2  
Old 04-06-2002, 11:46 AM
Cybnext_Design Cybnext_Design is offline
Registered User
Join Date: Jun 2001
Posts: 244
Cybnext_Design is on a distinguished road
Send a message via AIM to Cybnext_Design
Re: Alright!

Quote:
Originally posted by Saga2001
I have been working on this hat trading npc ever since Bhala decided to mess with it...and now...setgif isn't working...
So I post this qustion here to those of you who are leeter than I. Also its not that setgif needs to be cs because if i setgif door.png; it works fine, i think its not evaluating correctly and the .png is getting chopped or something.

NPC Code:

putnpc2 aimx,aimy,{
if (created) {
setshape 1,48,48;
setgifpart hat#v(this.item).png,96,0,48,48;
}
if (playertouchsme) {
hatc = strtofloat(#s(hatc#v(this.item)))+1;
setstring client.hatc#v(this.item),#v(hatc);
savelog2 hat-log.txt, +hat: #v(this.item) at (#v(x),#v(y)) in #L from #s(this.layer);
destroy;
}
};



I know its in the setgif cause it works fine with showimg and also another thing, setimg doesn't work and those places on the image with the setgifpart are correct...everything is setting right cept the setgif...any suggestions?
Why not just use:
NPC Code:

setimg haticons.png;
setcharani hatnpc,#v(#s(this.item));


instead of setgifpart?
__________________
Graal2001 NPC Maker
Frolic Owner
Aim: C Y B N E X T
  #3  
Old 04-06-2002, 12:07 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
try making the setgif clientsided
  #4  
Old 04-07-2002, 06:55 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Python523
try making the setgif clientsided
no, because setgif door.png works serverside so why would that matter...plus I did try that, no avail. I'll try the ani thing.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #5  
Old 04-07-2002, 08:59 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
What exactly is not working, you don't see it?
If the image (hatxxx.png) is on the server then it should work
  #6  
Old 04-08-2002, 04:09 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Stefan
What exactly is not working, you don't see it?
If the image (hatxxx.png) is on the server then it should work
Yes that is precicely it, you cannot see the image, and the image is on the server, I think maybe this should be in the bugs section, because the code appears correct.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #7  
Old 04-09-2002, 11:31 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 Saga2001


Yes that is precicely it, you cannot see the image, and the image is on the server, I think maybe this should be in the bugs section, because the code appears correct.
make the image a gif or 8 bit png
__________________
Donate money for my trip to Germany

Adiarde Manager
  #8  
Old 04-10-2002, 05:52 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by mhermher

make the image a gif or 8 bit png
Ummmm...
I do believe that all the hats meet those requirements...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #9  
Old 04-10-2002, 06:13 AM
Spanko Spanko is offline
Squeaker of Soles
Spanko's Avatar
Join Date: Nov 2001
Location: The Netherworl...lands
Posts: 1,366
Spanko is on a distinguished road
Send a message via ICQ to Spanko Send a message via AIM to Spanko Send a message via Yahoo to Spanko
Have you checked to see if it's properly passing the this.item string?
That's relatively easily done by just checking the local info on the level the NPC was just placed on.
If that isn't it, I don't know. Though of course replacing setgifpart with setimgpart looks fancier :P
__________________

ICQ: 125283920
MSN: [email protected]
AIM: Squeax0r
Squeaker seems unable to access the forum using this account.. tis a sad day.
Now with occasional Asuka flavour! Ooops a bit too much...
Asuka should be king of Dustari!

"Y'know, some days even my lucky rocketship underpants don't even help."
  #10  
Old 04-10-2002, 11:15 AM
ZeroFXSM ZeroFXSM is offline
Cutie
ZeroFXSM's Avatar
Join Date: Aug 2001
Posts: 941
ZeroFXSM is on a distinguished road
Send a message via AIM to ZeroFXSM
I still purpose that there should be a simulation so people want to test out serverside npcs CAN test them out.
__________________
ZeroFX :: part of the swordsmen clan since 1999
Find me on Aim: jimmydistrict
haha my character still has the blue dragon ammy
  #11  
Old 04-10-2002, 03:02 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Spanko
Have you checked to see if it's properly passing the this.item string?
That's relatively easily done by just checking the local info on the level the NPC was just placed on.
If that isn't it, I don't know. Though of course replacing setgifpart with setimgpart looks fancier :P
Yes I have it is passing the string, message #v(this.item); passes fine...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #12  
Old 04-10-2002, 07:00 PM
Spanko Spanko is offline
Squeaker of Soles
Spanko's Avatar
Join Date: Nov 2001
Location: The Netherworl...lands
Posts: 1,366
Spanko is on a distinguished road
Send a message via ICQ to Spanko Send a message via AIM to Spanko Send a message via Yahoo to Spanko
Quote:
Originally posted by Saga2001


Yes I have it is passing the string, message #v(this.item); passes fine...
In that case it's probably doing the created before it passes it on, just do a .1 second delay before it sets the image, it might fix it.
__________________

ICQ: 125283920
MSN: [email protected]
AIM: Squeax0r
Squeaker seems unable to access the forum using this account.. tis a sad day.
Now with occasional Asuka flavour! Ooops a bit too much...
Asuka should be king of Dustari!

"Y'know, some days even my lucky rocketship underpants don't even help."
  #13  
Old 04-12-2002, 07:03 AM
SaijinGohan SaijinGohan is offline
Registered User
SaijinGohan's Avatar
Join Date: Jul 2001
Location: U.S.A - Ohio
Posts: 536
SaijinGohan is on a distinguished road
Send a message via AIM to SaijinGohan Send a message via MSN to SaijinGohan
I agree with the gani stuff, it seems more.. sophisticated to me it seems
__________________

Job: A Legend

And you think that you have played Graal forever? Ha!
  #14  
Old 04-17-2002, 01:14 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Quote:
Originally posted by Saga2001


Yes I have it is passing the string, message #v(this.item); passes fine...
String?
Then it should be #s(this.item).
  #15  
Old 04-17-2002, 06:38 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
if you do

item = blabla;
putnpc x,y,blabla;
with (npcs[npcscount-1]) {
this.item = item;
}

it should work,
you can also use the local npc attributes log (there is a button on the RC) to see if this.item is set correctly
  #16  
Old 04-17-2002, 07:44 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Why not set the image in the with operator?

with(npcs[npcscount-1]) {
this.item = blahblahblah;
setgif hat#v(this.item).png;
}

????
I never tried it but im pretty sure it works.
__________________

subliminal message: 1+1=3
  #17  
Old 04-18-2002, 05:16 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Stefan
if you do

item = blabla;
putnpc x,y,blabla;
with (npcs[npcscount-1]) {
this.item = item;
}

it should work,
you can also use the local npc attributes log (there is a button on the RC) to see if this.item is set correctly
No, that didn't work, but i believe i did get it working, oh yeah and it wasn't a string sorry it was a var. Also if I parsed the this.item as a var it should return 0 so it would have just always been hat0.png. And I dumped the level vars, and it didn't do what it should have, that was when Andor's NPC Server was still a bit messed up. Maybe it was fixed.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
 


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 08:32 PM.


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