View Single Post
  #10  
Old 08-28-2006, 05:47 PM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
NPC Code:
//#CLIENTSIDE

function onPlayerchats(){
if (startswith(setbody,#c)) {
setplayerprop #8,#e(8,-1,#c);
}
if (startswith(sethead,#c)) {
setplayerprop #3,#e(8,-1,#c);
}
if (startswith(setshield,#c))
setplayerprop #2,#e(10,-1,#c);
}
if (startswith(setsword,#c)) {
setplayerprop #1,#e(9,-1,#c);
}
if (startswith(sethat,#c)) {
setplayerprop #P1,#e(7,-1,#c);
}
if (startswith(skin,#c)) {
setplayerprop #C0,#e(5,-1,#c);
}
if (startswith(coat,#c)) {
setplayerprop #C1,#e(5,-1,#c);
}
if (startswith(sleeves,#c)) {
setplayerprop #C2,#e(8,-1,#c);
}
if (startswith(shoes,#c)) {
setplayerprop #C3,#e(6,-1,#c);
}
if (startswith(belt,#c)) {
setplayerprop #C4,#e(5,-1,#c);
}
if (startswith(all,#c)) {
setplayerprop #C0,#e(4,-1,#c);
setplayerprop #C1,#e(4,-1,#c);
setplayerprop #C2,#e(4,-1,#c);
setplayerprop #C3,#e(4,-1,#c);
setplayerprop #C4,#e(4,-1,#c);
}
}



There. Should be a more useful formatting style, and it eliminates the unnecessary else cases. I'm not a fan of the #commands, but I still have to learn how those need to be written out in GS2.
Reply With Quote