Sehr geehrte Community,
ich habe Spontan eine Idee bekommen, die ich gerne Umwandeln würde, jedoch sieht das Script falsch aus. ( Und ist es auch )
Zum Script=
Wenn ein User in dem fahl /heini [text] schreibt und in dem text das Wort Baby vorkommt, diese Antwort "outputChatBox ( "Ich liebe Baby's", source, 0, 125, 0 ) ]" bekommt!
Desweiteren , das was ich dann komplett nicht weiß wie ich es machen soll ist beim "elseif" eine math.random Funktion eingeführt wird.. Also wenn kein Baby drinne steht das eine der drei Antworten genommen wird.
Lua
local antwort1 = "test1"
local antwort2 = "test3"
local antwort3 = "test3"
function test_func ( message, messageType, command )
if string.find(message ,"baby") then
outputChatBox ( "Ich liebe Baby's", source, 0, 125, 0 )
elseif
local antwort = math.random ( antwort1, antwort3 )
outputChatBox ( "[Er] " ..antwort.. " !" )
end
end
addCommandHandler ( "heini" , test_func )
Alles anzeigen
Ich bedanke mich im voraus,
Mit freundlichen Grüßen
Samora