junk.
PHP Code:
// Example Flexible Hat Shop Script
function onCreated() {
// Define Hat Shop Variables
this.hatimg = "hat1.png";
this.buycmd = "/buy hat";
this.amount = 100;
}
function onPlayerChats() {
// Check for buy hat command chat.
if (player.chat == this.buycmd) {
// Check if Player has enough rupees
if (player.rupees >= this.amount) {
// Remove rupees from Player
player.rupees -= this.amount;
// Set Player's Hat
player.attr[1] = this.hatimg;
} else {
// Player didn't have enough rupees
// send sign message to player.
player.say2("You need " @ this.amount @ " rupees!");
}
}
}
Edit: Someone should really expand upon Novo's dialog system and make it more newb-friendly so we see more GUI prompts than chat commands in future servers.