PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: ~~~~?Master?~~~~ on 06 May, 2005, 10:57:38

Title: phrase o rama spript
Post by: ~~~~?Master?~~~~ on 06 May, 2005, 10:57:38
Can somebody help me..... i need to  chage the script so it revealse only 1 word of a sentense


 i suspect its in this part of the phrase o rama script.....
function doreveal()
if startingphrase == 1 then testing = string.gsub(answer,"%a","?"); startingphrase = 0; SendToAll(BotName,"This Phrase will be worth "..remainscore.." point(s) per unrevealed letter plus 5 points for solution."); end
t,p = string.gsub(testing,"?","")
if p < 2 then
SendToAll(BotName,"The Answer Was: "..answer)
donewphrase()
else
curnumber = burp()
testing = string.sub(testing,1,curnumber-1)..string.sub(answer,curnumber,curnumber)..string.sub(testing,curnumber+1,string.len(testing))
SendToAll(BotName,"Vul de lege plek in:"..testing)
end
end

function burp()
curnumber = math.random(1,string.len(answer))
if string.sub(testing,curnumber,curnumber) ~= "?" then burp() end
return curnumber
end

 can somebody help me with it please
Title:
Post by: ~~~~?Master?~~~~ on 06 May, 2005, 10:59:15
i think i need 2 scripts then... 1 for sentenses and 1 for the answers....... am i correct??