(Upgrading Script) Upgrade |
Cheetahkitty « Citoyen » 1402699680000
| 1 | ||
Hi so I am making a script and I need other peoples help so this is how it goes I have some script You put other script that goes along with it in comments I add it to script (Then goes on and on....) So let's start tfm.exec.setUIShamanName("Yogiibear is prettyi=3") tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoScore(true) tfm.exec.disableAfkDeath(true) players={} function eventNewPlayer(name) players[name]={} end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end --This event is called when a player leaves the room function eventPlayerLeft(name) players[name]=nil --do other stuff -- end function eventSummoningEnd(name,objectType,x,y,angle,xspeed,yspeed,other) if objectType~=0 then tfm.exec.removeObject(other.id) end end for n in pairs (tfm.get.room.playerList) do system.bindMouse(n,true,true) end function eventMouse(n,x,y) print("["..n.."]:X{"..x.."};Y{"..y.."}") end function eventNewGame() local pList={} for p in pairs(tfm.get.room.playerList) do pList[ #pList + 1 ] = p end local ns = pList[ math.random( #pList ) ] tfm.exec.setShaman(ns) -- do some more stuff here end for n in pairs (tfm.get.room.playerList) do system.bindMouse(n,true,true) end function eventMouse(n,x,y) print("["..n.."]:X{"..x.."};Y{"..y.."}") end Dernière modification le 1403123820000 |
Shamousey « Consul » 1402705500000
| 0 | ||
Ooh is this a forum game? Sounds interesting. Here we go. tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoScore(true) tfm.exec.disableAfkDeath(true) players={} function eventNewPlayer(name) players[name]={} end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end I'll just put a bit of backbone into the script so there's something to work with. |
Cheetahkitty « Citoyen » 1402795560000
| 0 | ||
So first what Should be the Name? |
1 | ||
--This event is called when a player leaves the room function eventPlayerLeft(name) players[name]=nil --do other stuff -- end |
Shamousey « Consul » 1402835700000
| 1 | ||
Cheetahkitty a dit : Does it need a name? Just let people build onto it and see where it goes ;) function eventSummoningEnd(name,objectType,x,y,angle,xspeed,yspeed,other) if objectType~=0 then tfm.exec.removeObject(other.id) end end Dernière modification le 1402835760000 |
Cheetahkitty « Citoyen » 1402871520000
| 0 | ||
It's going good so far:) Dernière modification le 1402876320000 |
Yogiibear « Citoyen » 1402903500000
| 0 | ||
tfm.exec.setUIShamanName("Yogiibear is pretty") Add that to the start of the code :) Dernière modification le 1402903560000 |
Cheetahkitty « Citoyen » 1402961640000
| 0 | ||
Yogiibear a dit : xD I'm adding it to the scrpt |
Benbirkralm « Citoyen » 1402997400000
| 0 | ||
I think you must add 'quote' to completed script for n in pairs (tfm.get.room.playerList) do system.bindMouse(n,true,true) end function eventMouse(n,x,y) print("["..n.."]:X{"..x.."};Y{"..y.."}") end |
Leafileaf « Citoyen » 1403014500000
| 0 | ||
edit: eww the forums wouldn't load my post properly function eventNewGame() local pList={} for p in pairs(tfm.get.room.playerList) do pList[ #pList + 1 ] = p end local ns = pList[ math.random( #pList ) ] tfm.exec.setShaman(ns) -- do some more stuff here end nvm fixed it by adding some spaces Dernière modification le 1403014980000 |
Benbirkralm « Citoyen » 1403026380000
| 0 | ||
Add this to first. i=3 Meh. Add this into eventMouse(). This is very easy, I know. But sometimes if you haven't some EASY codes in your script; you can't make anything. So nub @Neonstrayzer (In vBullettin 4.2+, you can make this @ tag.) i=i+1 if i==3 then print("You can't use more. Sorry --'") else tfm.exec.movePlayer(n,x,y) end Written in Nokia Phone has got a Symbian Software. |
Kmlcan « Citoyen » 1403055420000
| 1 | ||
Add this in eventNewPlayer tfm.exec.bindKeyboard(name, 32, true, true) Then add this down below. function eventKeyboard(name, key, down, x, y) if key == 32 then tfm.exec.movePlayer(name, nil, nil, nil, nil, -50) end end |
Safwanrockz « Censeur » 1403087700000
| 0 | ||
Add this to eventLoop() function eventLoop() for name in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(name, string.format("%X", math.random(0x000000, 0xFFFFFF))) end end |
Cheetahkitty « Citoyen » 1403123220000
| 0 | ||
some isn't working ben Benbirkralm a dit : do I put it in the place of function eventMouse(n,x,y) [Moderator] Please don't double post! Use the Edit button by clicking on your name instead. Dernière modification le 1403125020000 |
Cheetahkitty 1403124120000
| | ||
[Modéré par Katburger, raison : Double post] |
Benbirkralm « Citoyen » 1403163480000
| 0 | ||
cheetahkitty a dit : Yes. |
Cheetahkitty 1403186340000
| | ||
[Modéré par Katburger, raison : off-topic] |
Leafileaf « Citoyen » 1403429880000
| 0 | ||
add this to eventloop (at the front) print("hi. this is a troll") |
Neonstrayzer « Citoyen » 1403717940000
| 0 | ||
add this to 2 shaman (all round) tfm.exec.disableAutoShaman(true) function twoShaman() local score={} shamans={} for k,v in pairs(tfm.get.room.playerList) do table.insert(score,{n=k,s=v.score}) end table.sort(score,function(one,two) return one.s>two.s end) return score[1],score[2] end And update eventNewGame() function eventNewGame() for k,v in pairs({twoShaman()}) do table.insert(shamans,v.n) tfm.exec.setShaman(v.n) if #shamans==2 then tfm.exec.setNameColor(v.n,0xFEB1FC) end end tfm.exec.setUIShamanName("<ch>"..shamans[1].." <n>- <font color='#FEB1FC'>"..shamans[2]) for k,v in pairs(tfm.get.room.playerList) do notShaman=true for i=1,#shamans do if k==shamans[i] then notShaman=false end end if notShaman then tfm.exec.setNameColor(k,0xC2C2DA) end end end Dernière modification le 1403851680000 |
Fireyone « Citoyen » 1403728020000
| 0 | ||
add tfm.exec.setUIShamanName("<ROSE>Fireyone <BL>is silly") ^ Just some twist and add a admin bar if you like admins = {Name1 = true, Name2 = true} -Whatever you want to add for admins- -Lemme finish bitting my foot off- Dernière modification le 1403728080000 |