Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-23-2001, 02:49 AM
9898 9898 is offline
Registered User
Join Date: Aug 2001
Location: United States
Posts: 31
9898 is on a distinguished road
Send a message via AIM to 9898 Send a message via Yahoo to 9898
Question hat script

i found this script but its too long and would take days to put up all hats
// NPC made by Adrenaline
if (playerchats && strequals(#c,knighthelmet)) {
set knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,samurai)) {
unset knighthelmet;
set samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,beret)) {
unset knighthelmet;
unset samurai;
set beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,bomyshell)) {
unset knighthelmet;
unset samurai;
unset beret;
set bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,gentleman)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
set gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,fool)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
set fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,pirate)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
set pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,bandana)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
set bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,cap)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
set cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,turban)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
set turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
set elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
set blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
set flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
set egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
set wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
set crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
set shroom;
unset ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
set ladyhat;
unset cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
set cowboy;
unset elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
set elf2;
unset goldhelmet;
}
if (playerchats && strequals(#c,elf)) {
unset knighthelmet;
unset samurai;
unset beret;
unset bomyshell;
unset gentleman;
unset fool;
unset pirate;
unset bandana;
unset cap;
unset turban;
unset elf;
unset blackbandana;
unset flower;
unset egg;
unset wingedknight;
unset crown;
unset shroom;
unset ladyhat;
unset cowboy;
unset elf2;
set goldhelmet;
}
see what i mean
how can i shorten it
__________________
Reply With Quote
  #2  
Old 08-23-2001, 02:51 AM
Komieko Komieko is offline
Registered User
Join Date: Mar 2001
Posts: 494
Komieko is on a distinguished road
Couldn't it be done WAY shorter with strings?I'm no scripting expert but couldn't it have been done shorter with the use of strings?
Reply With Quote
  #3  
Old 08-23-2001, 02:53 AM
9898 9898 is offline
Registered User
Join Date: Aug 2001
Location: United States
Posts: 31
9898 is on a distinguished road
Send a message via AIM to 9898 Send a message via Yahoo to 9898
i dont know much about scripting either so i need help
__________________
Reply With Quote
  #4  
Old 08-23-2001, 03:13 AM
Guest
Posts: n/a
who the hell are those clowns
Reply With Quote
  #5  
Old 08-23-2001, 03:31 AM
Lyndzey8000 Lyndzey8000 is offline
Registered User
Join Date: Mar 2001
Posts: 372
Lyndzey8000 is on a distinguished road
Send a message via ICQ to Lyndzey8000 Send a message via AIM to Lyndzey8000
That script would lag a lot. I recommend you using strings instead of flags, and you shouldnt use flags. If you dont get strings you should use this.variables which would cut down on the lag. I am not sure what the hat charprop is...if you find it for me I will script it. I am too busy to look for it.
__________________
This account is used by Psyhcu because I am too lazy to register my own.
Reply With Quote
  #6  
Old 08-23-2001, 04:12 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
functions would come in handy too. Make a function that unsets all of the hats and then u could have it unset all hats and then add the 1 thats wanted. Thats much easier
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #7  
Old 08-23-2001, 04:24 AM
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
LOL
Reply With Quote
  #8  
Old 08-23-2001, 04:32 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
That guy who calles himself Satan told me the script and it was just 4 lines but i am not going to post it the level I put it in is to laggy cuse of to many hats I need to make another hat shop
Reply With Quote
  #9  
Old 08-23-2001, 05:12 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
do like
if (playerchats&&strequals(#c,elf hat)) {
setstring myhat,elf hat;
}

and hats work as Gani's.. its a param if u look at the command list on the bottom it even tells you
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #10  
Old 08-23-2001, 05:20 AM
9898 9898 is offline
Registered User
Join Date: Aug 2001
Location: United States
Posts: 31
9898 is on a distinguished road
Send a message via AIM to 9898 Send a message via Yahoo to 9898
I tried setplayerprop #p1, hat0.png; but it didnt work
__________________
Reply With Quote
  #11  
Old 08-23-2001, 05:24 AM
9898 9898 is offline
Registered User
Join Date: Aug 2001
Location: United States
Posts: 31
9898 is on a distinguished road
Send a message via AIM to 9898 Send a message via Yahoo to 9898
ok if (playerchats&&strequals(#c,elf hat)) {
setstring myhat,elf hat;
} didnt work i dont know why i think its cause the hat npc and hats have to run together so it didnt work :/ i may need both a new hat npc and script
__________________
Reply With Quote
  #12  
Old 08-23-2001, 08:00 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Hat Script ...

Here's my hat script ....
//NPC made by Nyght (FAQ)
if (playertouchsme) {
toweapons Samurai Farmer Hat;
hidelocal;
}
if (playerenters && !isweapon) {
if (hasweapon(Samurai Farmer Hat)) {
hidelocal;
} else {
showlocal;
}
}
if (weaponfired) {
if (this.on==false) {
this.on = true;
} else {
this.on = false;
}
timeout = 0.05;
}
if (timeout && this.on==true) {
if (this.puton==false) {
freezeplayer 0.1;
playersprite = 23;
showimg 1,samfarmhat1.gif,playerx,playery-0.7;
sleep 0.1;
playersprite = 24;
showimg 1,samfarmhat1.gif,playerx,playery-1.1;
this.puton = true;
}
if (playerdir==0) {
if (strequals(#m,sword)) {
showimg 1,samfarmhat1.gif,playerx,playery-1.3;
}
else if (strequals(#m,grab)) {
showimg 1,samfarmhat1.gif,playerx,playery-0.9;
}
else if (strequals(#m,pull)) {
showimg 1,samfarmhat2.gif,playerx+0.3,playery+1;
}
else if (strequals(#m,hurt)) {
showimg 1,samfarmhat1.gif,playerx,playery-0.8;
}
else if (strequals(#m,sit)) {
showimg 1,samfarmhat1.gif,playerx,playery-1.3;
} else {
showimg 1,samfarm1.gif,playerx,playery-1;
}
}
if (playerdir==1) {
if (strequals(#m,sword)) {
showimg 1,samfarmhat1.gif,playerx-0.1,playery-1;
}
else if (strequals(#m,grab)) {
showimg 1,samfarmhat1.gif,playerx-0.1,playery-1;
}
else if (strequals(#m,pull)) {
showimg 1,samfarmhat3.gif,playerx+2,playery;
}
else if (strequals(#m,hurt)) {
showimg 1,samfarmhat1.gif,playerx+0.1,playery-0;
}
else if (strequals(#m,sit)) {
showimg 1,samfarmhat1.gif,playerx+0.5,playery-1;
}
else if (strequals(#m,push)) {
showimg 1,samfarmhat1.gif,playerx,playery-1.1;
} else {
showimg 1,samfarmhat1.gif,playerx+0.15,playery-2;
}
}
if (playerdir==2) {
if (strequals(#m,sword)) {
showimg 1,samfarmhat1.gif,playerx,playery-0.9;
}
else if (strequals(#m,grab)) {
showimg 1,samfarmhat1.gif,playerx,playery-0.7;
}
else if (strequals(#m,pull)) {
showimg 1,samfarmhat5.gif,playerx+0.3,playery;
}
else if (strequals(#m,hurt)) {
showimg 1,samfarmhat1.gif,playerx,playery-1;
}
else if (strequals(#m,sit)) {
showimg 1,samfarmhat1.gif,playerx,playery-1.5;
}
else if (strequals(#m,push)) {
showimg 1,samfarmhat1.gif,playerx,playery-0.7;
} else {
showimg 1,samfarmhat1.gif,playerx,playery-1;
}
}
if (playerdir==3) {
if (strequals(#m,sword)) {
showimg 1,samfarmhat1.gif,playerx,playery-1;
}
else if (strequals(#m,grab)) {
showimg 1,samfarmhat1.gif,playerx-0.1,playery-1.5;
}
else if (strequals(#m,pull)) {
showimg 1,samfarmhat4.gif,playerx-0.5,playery;
}
else if (strequals(#m,hurt)) {
showimg 1,samfarmhat1.gif,playerx+0.1,playery-1.5;
}
else if (strequals(#m,sit)) {
showimg 1,samfarmhat1.gif,playerx-0.3,playery-1.5;
}
else if (strequals(#m,push)) {
showimg 1,samfarmhat1.gif,playerx+0.1,playery-1.5;
} else {
showimg 1,samfarmhat1.gif,playerx-0.1,playery-1
}
}
if (strequals(#m,dead) || strequals(#m,swim)) {
this.on = false;
this.skip = true;
}
timeout = 0.05;
}
if (timeout && this.on==false) {
if (this.skip==true) {
freezeplayer 0.5;
playersprite = 24;
showimg 1,samfarmhat1.gif,playerx,playery-1.1;
sleep 0.1;
playersprite = 23;
showimg 1,samfarmhat1.gif,playerx,playery-0.7;
sleep 0.1;
}
} else {
showimg 1,samfarmhat1.gif,playerx-0.1,playery-1;
}
}
if (strequals(#m,dead) || strequals(#m,swim)) {
this.on = false;
this.skip = true;
}
timeout = 0.05;
}
if (timeout && this.on==false) {
if (this.skip==true) {
freezeplayer 0.5;
playersprite = 24;
showimg 1,samfarmhat1.gif,playerx,playery-1.1;
sleep 0.1;
playersprite = 23;
showimg 1,samfarmhat1.gif,playerx,playery-0.7;
sleep 0.1;
}
hideimg 1;
sleep 0.1;
playersprite = 0;
this.puton = false;
this.skip = false;
}
It sorta works ...
Reply With Quote
  #13  
Old 08-23-2001, 10:31 AM
omni-m00gle omni-m00gle is offline
delete all proofs
omni-m00gle's Avatar
Join Date: Apr 2001
Location: United Kingdom
Posts: 2,528
omni-m00gle is on a distinguished road
Send a message via AIM to omni-m00gle
if (playerchats && weaponfired && strcontains(hat)) {
setplayerprop #P1,#C;
}
Im not sure if that would work, because I made it off the top of my simple minded head.
__________________
-+ Malak +-

Never taste of the fruit...

Quote:
Originally posted by Stefan
on andor i got jailed for
impersonating me
Reply With Quote
  #14  
Old 08-23-2001, 11:10 AM
CrazedMerlin CrazedMerlin is offline
Some Guy :\
Join Date: Apr 2001
Posts: 3,619
CrazedMerlin is on a distinguished road
Send a message via AIM to CrazedMerlin Send a message via Yahoo to CrazedMerlin
if (playerchats) {tokenize #c;
if (playerchats&&strequals(#c, )) {
setcharprop #whateverhatisiforgot,#t(#c));
}
}

or something
__________________

ICQ: 117881194
AIM: TehWizad
E-Mail: [email protected]
Reply With Quote
  #15  
Old 08-23-2001, 11:36 AM
Guest
Posts: n/a
nyght your a idiot! thats my script i made, and is showed you it! please dont be a idiot and steal my scripts you idiot!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:13 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.