Quote:
|
Originally Posted by killerogue
This is me being the guy who started learning scripting today.
function onCreated(){
e = "Penguin";
say(e);
}
function onCreated(){
e = "Penguin";
player.chat = e;
;
Now, the first would make me say penguin with anything I said correct? And the second would be only when I said e?
|
You are actually looking for onplayerchats for saying stuff anf getting stuff back.
NPC Code:
function onPlayerchats() {
}
That will start the whole ball rolling, now you want to return something when you say e?
NPC Code:
if (player.chat == "e") {
}
and return something else otherwise?
NPC Code:
else{
say2("e");
}
Now lets put it all into practice.
NPC Code:
function onPlayerchats() {
if (player.chat == "e") {
player.chat = "Penguin";
}else{
say2("Penguin");
}
}
Hope I have helped you some.