Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- players={}
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame("@4434091")
- q=90
- function eventNewGame()
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAllShamanSkills(true)
- tfm.exec.disableAfkDeath(true)
- end
- function eventNewPlayer(a)
- system.bindMouse(a, true)
- players[a]={h =100, j= 100,k=100,d=0,u=0,ch=0,cj=0,ck=0,np=1}
- ui.addTextArea(666," ",nil ,5,303,635,90, 0x272834, 0x272834)
- ui.addTextArea(1,"Hunger<br> "..players[a].h.."/100", nil ,12,310,90,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(2,"Hygiene<br> "..players[a].j.."/100", nil ,115,310,90,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(4,"Fun <br>"..players[a].k.."/100", nil ,218,310,90,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(3," ",nil ,12,360,296,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(unknown,'Current mood: <br><p align="center" ><font size="52" color="# 0DFA0C">:D</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- tfm.exec.respawnPlayer(a)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- system.bindMouse(name, true)
- players[name]={h =100, j= 100,k=100,d=0,u=0,ch=0,cj=0,ck=0,np=0}
- ui.addTextArea(666," ",nil ,5,303,635,90, 0x272834, 0x272834)
- ui.addTextArea(1,"Hunger<br> "..players[name].h.."/100", nil ,12,310,90,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(2,"Hygiene<br> "..players[name].j.."/100", nil ,115,310,90,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(4,"Fun <br>"..players[name].k.."/100", nil ,218,310,90,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(3," ",nil,12,360,296,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# 0DFA0C">:D</font></p>', nil ,540,310,90,80, 0x3c5064, 0x3c5064)
- end
- function eventLoop(f, g)
- for a in pairs(tfm.get.room.playerList) do
- if players[a].h > 0 then
- players[a].h= players[a].h-1
- end
- if players[a].j > 0 then
- players[a].j= players[a].j-1
- end
- if players[a].k > 0 then
- players[a].k= players[a].k-1
- end
- ui.addTextArea(1,"Hunger<br> "..players[a].h.."/100", a ,12,310,90,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(2,"Hygiene<br> "..players[a].j.."/100", a ,115,310,90,30, 0x3c5064, 0x3c5064)
- ui.addTextArea(4,"Fun<br> "..players[a].k.."/100", a ,218,310,90,30, 0x3c5064, 0x3c5064)
- if players[a].np==0 then
- if players[a].h<70 and players[a].k>30 and players[a].ch==0 then
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# ED9B00C">:|</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].ch=1
- end
- if players[a].j<70 and players[a].j>30 and players[a].cj ==0 then
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# ED9B00C">:|</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].cj=1
- end
- if players[a].k<70 and players[a].k>30 and players[a].ck ==0 then
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# ED9B00C">:|</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].ck =1
- end
- if players[a].h<30 and players[a].ch ==1 then
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# AD0300">:(</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].ch =2
- end
- if players[a].j<30 and players[a].cj ==1 then
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# AD0300">:(</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].cj =2
- end
- if players[a].k<30 and players[a].ck ==1 then
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# AD0300">:(</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].ck =2
- end
- if players[a].ch ==1 and players[a].cj ==1 and players[a].ck ==1 then
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# ED9B00C">:|</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- end
- if players[a].ch ==0 and players[a].cj ==0 and players[a].ck ==0 then
- ui.addTextArea(300,'Current mood: <br><p align="center" ><font size="52" color="# 0DFA0C">:D</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- end
- end
- if players[a].np==1 then
- if players[a].h<70 and players[a].k>30 and players[a].ch==0 then
- ui.addTextArea(301,'Current mood: <br><p align="center" ><font size="52" color="# ED9B00C">:|</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].ch=1
- end
- if players[a].j<70 and players[a].j>30 and players[a].cj ==0 then
- ui.addTextArea(301,'Current mood: <br><p align="center" ><font size="52" color="# ED9B00C">:|</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].cj=1
- end
- if players[a].k<70 and players[a].k>30 and players[a].ck ==0 then
- ui.addTextArea(301,'Current mood: <br><p align="center" ><font size="52" color="# ED9B00C">:|</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].ck =1
- end
- if players[a].h<30 and players[a].ch ==1 then
- ui.addTextArea(301,'Current mood: <br><p align="center" ><font size="52" color="# AD0300">:(</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].ch =2
- end
- if players[a].j<30 and players[a].cj ==1 then
- ui.addTextArea(301,'Current mood: <br><p align="center" ><font size="52" color="# AD0300">:(</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].cj =2
- end
- if players[a].k<30 and players[a].ck ==1 then
- ui.addTextArea(301,'Current mood: <br><p align="center" ><font size="52" color="# AD0300">:(</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- players[a].ck =2
- end
- if players[a].ch ==1 and players[a].cj ==1 and players[a].ck ==1 then
- ui.addTextArea(301,'Current mood: <br><p align="center" ><font size="52" color="# ED9B00C">:|</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- end
- if players[a].ch ==0 and players[a].cj ==0 and players[a].ck ==0 then
- ui.addTextArea(301,'Current mood: <br><p align="center" ><font size="52" color="# 0DFA0C">:D</font></p>', a ,540,310,90,80, 0x3c5064, 0x3c5064)
- end
- end
- if players[a].h >30 and players[a].h <70 then
- players[a].ch =1
- end
- if players[a].j >30 and players[a].j <70 then
- players[a].cj =1
- end
- if players[a].k >30 and players[a].k <70 then
- players[a].ck =1
- end
- if players[a].h >70 then
- players[a].ch =0
- end
- if players[a].j >70 then
- players[a].cj =0
- end
- if players[a].k >70 then
- players[a].ck =0
- end
- if players[a].h < 0 then
- players[a].h = 0
- end
- if players[a].h > 100 then
- players[a].h = 100
- end
- if players[a].j < 0 then
- players[a].j = 0
- end
- if players[a].j > 100 then
- players[a].j = 100
- end
- if players[a].k < 0 then
- players[a].k =0
- end
- if players[a].k > 100 then
- players[a].k =100
- end
- if players[a].h==0 then
- tfm.exec.killPlayer(a)
- ui.addTextArea(3," "..a.." is dead because hunger :'(", a ,12,360,296,30, 0x3c5064, 0x3c5064)
- players[a].d=1
- if players[a].u==0 then
- ui.addPopup(q,1,'Your pet is now dead! Would you like to adopt new one? (dont mess up this time!) ',a,250,180,300)
- players[a].u=1
- end
- elseif players[a].j==0 then
- ui.addTextArea(3," "..a.." is smelly",a ,12,360,296,30, 0x3c5064, 0x3c5064)
- elseif players[a].k==0 then
- ui.addTextArea(3," "..a.." is very bored",a ,12,360,296,30, 0x3c5064, 0x3c5064)
- end
- end
- end
- function eventMouse(a, x, y)
- if (x > 715 and x < 795 ) and ( y > 30 and y < 110) and players[a].d==0 then
- players[a].h= players[a].h+20
- ui.addTextArea(3," "..a.." ate a lot of cookies!", a ,12,360,296,30, 0x3c5064, 0x3c5064)
- elseif (x > 715 and x < 795 ) and ( y > 120 and y < 200) and players[a].d==0 then
- players[a].j= players[a].j+50
- ui.addTextArea(3," "..a.." takes a shower!", a ,12,360,296,30, 0x3c5064, 0x3c5064)
- elseif (x > 715 and x < 795 ) and ( y > 210 and y < 290) and players[a].d==0 then
- players[a].k= players[a].k+10
- ui.addTextArea(3," "..a.." plays with Mr.Teddy!", a ,12,360,296,30, 0x3c5064, 0x3c5064)
- end
- end
- function eventPopupAnswer(q,a,r)
- if(r=='yes') then
- players[a].h=100
- players[a].j=100
- players[a].k=100
- players[a].d=0
- players[a].u=0
- tfm.exec.respawnPlayer(a)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement