Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-22-2002, 02:51 AM
darkriders_p2p darkriders_p2p is offline
Registered User
Join Date: Jan 2002
Location: Canada
Posts: 690
darkriders_p2p is on a distinguished road
Talking My Hat NPC -Again-

Ok I am making my hat NPC.
I need to make something with arrays so I can do this:
Make it so I can only use the hats I buy and not every hat.
and when I cycle through only to show the hats that I own.
If you can help me with this please do, I posting me script so you can see.

AND DELTERIA NO SCRIPT STEALING :P
anyone else too

NPC Code:

//NPC made by /\/\ãxïmus Ðärkrïdër
if (playertouchsme) {
toweapons Hat NPC;
}
if (weaponfired) {
this.hb=1;
setani idle,;
setplayerdir down;
disabledefmovement;
timeout=.1;
}
if (timeout&&this.hb==1) {
if (keydown(1)) { i--;
}
if (keydown(3)) {
i++;
} if (keydown(5)) {
if (strequals(#s(client.hat),)&&this.hb==1) {
setstring client.hat,hat#v(i).png;
setplayerprop #P1,#s(client.hat);
setani haton,#s(client.hat);
sleep .1;
enabledefmovement;
this.hb=0;
hideimg 1;
}
if (!strequals(#s(client.hat),)&&this.hb==1) {
setani hatoff,#s(client.hat);
sleep 0.7;
setstring client.hat,;
setplayerprop #P1,;
sleep .1;
enabledefmovement;
setani idle,;
this.hb=0;
hideimg 1;
}
}
if (keydown(6)) {
hideimg 1;
enabledefmovement;
setani idle,;
this.hb=0;
}
showimg 1,hat#v(i).png,playerx-.06,playery-2;
changeimgpart 1,95,0,48,48;
timeout=.1;
if (i<0) {
i=0;
}
}
if (this.hb==0) {
hideimg 1;
}

__________________
maximus_asinus
Reply With Quote
 


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 03:19 PM.


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