Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   SetHead,Setsword,setbody,setshield (https://forums.graalonline.com/forums/showthread.php?t=17001)

Onyx_Brasil 11-16-2001 01:41 AM

SetHead,Setsword,setbody,setshield
 
Hey, can someone say to me what i have to put in a level to when i say"setbody body1.gif" it changes and with setshield,setsword the same thing,,, what i have to do?

nyghtGT 11-16-2001 01:48 AM

use this offline tailor NPC i made its kinda neat ...
NPC Code:

NPC Code:

// NPC Made By Nyght
if (created) {
setgif clotheshelper_icon.png;
}
if (playertouchsme) {
toweapons Tailor;
}
if (playerchats && startswith(skin,#c)) {
tokenize #c;
setplayerprop #C0,#t(1);
}
if (playerchats && startswith(coat,#c)) {
tokenize #c;
setplayerprop #C1,#t(1);
}
if (playerchats && startswith(sleeves,#c)) {
tokenize #c;
setplayerprop #C2,#t(1);
}
if (playerchats && startswith(shoes,#c)) {
tokenize #c;
setplayerprop #C3,#t(1);
}
if (playerchats && startswith(belt,#c)) {
tokenize #c;
setplayerprop #C4,#t(1);
}
if (playerchats && startswith(setsword,#c)) {
tokenize #c;
setplayerprop #1,#(1);
}
if (playerchats && startswith(setshield,#c)) {
tokenize #c;
setplayerprop #2,#(1);
}
if (playerchats && startswith(sethead,#c)) {
tokenize #c;
setplayerprop #3,#(1);
}
if (playerchats && startswith(setbody,#c)) {
tokenize #c;
setplayerprop #4,#t(1);
}
if (playersays(save clothes)) {
setstring client.saveclothes,#C0 #C1 #C2 #C3 #C4 #1 #2 #3 #4;
}
if (playersays(apply clothes)) {
tokenize #s(client.saveclothes);
setplayerprop #C0,#t(0);
setplayerprop #C1,#t(1);
setplayerprop #C2,#t(2);
setplayerprop #C3,#t(3);
setplayerprop #C4,#t(4);
setplayerprop #1,#t(5);
setplayerprop #2,#t(6);
setplayerprop #3,#t(7);
setplayerprop #4,#t(8);
}




its a fairly simple script so i aint gonna bug you about stealing it but if you need any parts explained please let me know .... Also there is a clothing saver i added to it .... pretty neat ....

Onyx_Brasil 11-16-2001 01:50 AM

WOW MAN, thanks a lot
 
thanks man, i wont stole it, i will use it in a ofline level because i am doing some heads, and i want to see how they are there, and i cant change the head and the other things,, but now i can!:D :D

nyghtGT 11-16-2001 01:51 AM

k ...

TDO2000 11-16-2001 03:05 AM

Quote:

Originally posted by nyghtGT
use this offline tailor NPC i made its kinda neat ...
NPC Code:

NPC Code:

// NPC Made By Nyght
if (created) {
setgif clotheshelper_icon.png;
}
if (playertouchsme) {
toweapons Tailor;
}
if (playerchats && startswith(skin,#c)) {
tokenize #c;
setplayerprop #C0,#t(1);
}
if (playerchats && startswith(coat,#c)) {
tokenize #c;
setplayerprop #C1,#t(1);
}
if (playerchats && startswith(sleeves,#c)) {
tokenize #c;
setplayerprop #C2,#t(1);
}
if (playerchats && startswith(shoes,#c)) {
tokenize #c;
setplayerprop #C3,#t(1);
}
if (playerchats && startswith(belt,#c)) {
tokenize #c;
setplayerprop #C4,#t(1);
}
if (playerchats && startswith(setsword,#c)) {
tokenize #c;
setplayerprop #1,#(1);
}
if (playerchats && startswith(setshield,#c)) {
tokenize #c;
setplayerprop #2,#(1);
}
if (playerchats && startswith(sethead,#c)) {
tokenize #c;
setplayerprop #3,#(1);
}
if (playerchats && startswith(setbody,#c)) {
tokenize #c;
setplayerprop #4,#t(1);
}
if (playersays(save clothes)) {
setstring client.saveclothes,#C0 #C1 #C2 #C3 #C4 #1 #2 #3 #4;
}
if (playersays(apply clothes)) {
tokenize #s(client.saveclothes);
setplayerprop #C0,#t(0);
setplayerprop #C1,#t(1);
setplayerprop #C2,#t(2);
setplayerprop #C3,#t(3);
setplayerprop #C4,#t(4);
setplayerprop #1,#t(5);
setplayerprop #2,#t(6);
setplayerprop #3,#t(7);
setplayerprop #4,#t(8);
}




its a fairly simple script so i aint gonna bug you about stealing it but if you need any parts explained please let me know .... Also there is a clothing saver i added to it .... pretty neat ....

1. DO NOT USE PLAYERSAYS (running around crying)
2. this can be short...

nyghtGT 11-16-2001 04:32 AM

Quote:

Originally posted by TDO2000


1. DO NOT USE PLAYERSAYS (running around crying)
2. this can be short...

by shorter do you mean:

if (playerchats && startswith(change,#c)) {
tokenize #c;
set#t(1)color #t(2);
}

and i say 'change item color'

Essenity 01-26-2002 02:49 AM

You could also do instead of tokenize... just a thought..

if (playerchats) {
if (strequals(#e(0,6,#c),skin: )) setplayerprop #C0,#e(6,-1,#c);
if (strequals(#e(0,6,#c),coat: )) setplayerprop #C1,#e(6,-1,#c);
if (strequals(#e(0,9,#c),sleeves: )) setplayerprop #C2,#e(9,-1,#c);
if (strequals(#e(0,7,#c),shoes: )) setplayerprop #C3,#e(7,-1,#c);
if (strequals(#e(0,6,#c),belt: )) setplayerprop #C4,#e(6,-1,#c);

}

Kadar 01-26-2002 04:10 AM

Re: SetHead,Setsword,setbody,setshield
 
Quote:

Originally posted by Onyx_Brasil
Hey, can someone say to me what i have to put in a level to when i say"setbody body1.gif" it changes and with setshield,setsword the same thing,,, what i have to do?
It can be enabled serverside in Serveroptions.txt

TDO2000 01-26-2002 05:32 AM

Re: Re: SetHead,Setsword,setbody,setshield
 
Quote:

Originally posted by Kadar

It can be enabled serverside in Serveroptions.txt

he wanted it offline and I don't think he won't an help after 2 month...


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

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