diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-04-14 15:41:33 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-04-14 15:41:33 +0200 |
commit | 0f1449567d5a2ccab9ff6fdc9975150299482834 (patch) | |
tree | 9d03df41026928cc5cecd6801a0f214fabd1d77e /example/scripts/npcs/debugger.lua | |
parent | 080ddbe822b03416934a875b2d949e3afc84fb96 (diff) | |
download | manaserv-0f1449567d5a2ccab9ff6fdc9975150299482834.tar.gz manaserv-0f1449567d5a2ccab9ff6fdc9975150299482834.tar.bz2 manaserv-0f1449567d5a2ccab9ff6fdc9975150299482834.tar.xz manaserv-0f1449567d5a2ccab9ff6fdc9975150299482834.zip |
Simplified some script function names
npc_message -> say
npc_choice -> ask
npc_ask_integer -> ask_number
npc_ask_string -> ask_string
npc_trade -> trade
Diffstat (limited to 'example/scripts/npcs/debugger.lua')
-rw-r--r-- | example/scripts/npcs/debugger.lua | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/example/scripts/npcs/debugger.lua b/example/scripts/npcs/debugger.lua index e21982a8..669964ee 100644 --- a/example/scripts/npcs/debugger.lua +++ b/example/scripts/npcs/debugger.lua @@ -12,38 +12,38 @@ function npc1_talk(npc, ch) on_remove(ch, function() print "Player has left the map." end); - npc_message("Hello! I am the testing NPC.") + say("Hello! I am the testing NPC.") local rights = chr_get_rights(ch); if (rights >= 128) then - npc_message("Oh mighty server administrator, how can I avoid your wrath?") + say("Oh mighty server administrator, how can I avoid your wrath?") elseif (rights >= 8) then - npc_message("How can I be of assistance, sir gamemaster?") + say("How can I be of assistance, sir gamemaster?") elseif (rights >= 4) then - npc_message("What feature would you like to debug, developer?") + say("What feature would you like to debug, developer?") elseif (rights >= 2) then - npc_message("How can I assist you in your testing duties?") + say("How can I assist you in your testing duties?") elseif (rights >= 1) then - npc_message("What do you want, lowly player?") + say("What do you want, lowly player?") else - npc_message("...aren't you supposed to be banned??") + say("...aren't you supposed to be banned??") end - local v = npc_choice("Guns! Lots of guns!", - "A Christmas party!", - "To make a donation.", - "Slowly count from one to ten.", - "Tablepush Test") + local v = ask("Guns! Lots of guns!", + "A Christmas party!", + "To make a donation.", + "Slowly count from one to ten.", + "Tablepush Test") if v == 1 then - npc_message("Sorry, this is a heroic-fantasy game, I do not have any gun.") + say("Sorry, this is a heroic-fantasy game, I do not have any gun.") elseif v == 2 then local n1, n2 = chr_inv_count(ch, 524, 511) if n1 == 0 or n2 ~= 0 then - npc_message("Yeah right...") + say("Yeah right...") else - npc_message("I can't help you with the party. But I see you have a fancy hat. I could change it into Santa's hat. Not much of a party, but it would get you going.") - v = npc_choice("Please do.", "No way! Fancy hats are classier.") + say("I can't help you with the party. But I see you have a fancy hat. I could change it into Santa's hat. Not much of a party, but it would get you going.") + v = ask("Please do.", "No way! Fancy hats are classier.") if v == 1 then chr_inv_change(ch, 524, -1, 511, 1) end @@ -51,14 +51,14 @@ function npc1_talk(npc, ch) elseif v == 3 then if chr_money_change(ch, -100) then - npc_message(string.format("Thank you for you patronage! You are left with %d GP.", chr_money(ch))) + say(string.format("Thank you for you patronage! You are left with %d GP.", chr_money(ch))) local g = tonumber(chr_get_quest(ch, "001_donation")) if not g then g = 0 end g = g + 100 chr_set_quest(ch, "001_donation", g) - npc_message(string.format("As of today, you have donated %d GP.", g)) + say(string.format("As of today, you have donated %d GP.", g)) else - npc_message("I would feel bad taking money from someone that poor.") + say("I would feel bad taking money from someone that poor.") end elseif v == 4 then @@ -95,6 +95,6 @@ function npc1_talk(npc, ch) print("---------------"); end - npc_message("See you later!") + say("See you later!") end |