Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Megacity
- -- Créditos:Brenower
- --[[Xml:<C><P /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="114" o="cbcbcb" X="271" Y="305" T="12" H="84" /><S P="0,0,0.3,0.2,0,0,0,0" L="119" o="675e4a" X="271" Y="328" T="12" H="22" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="324650" X="210" Y="302" T="12" H="91" /><S L="10" o="324650" X="333" H="91" Y="302" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="14" o="c5a365" X="271" Y="275" T="13" H="10" /><S P="0,0,0.3,0.2,0,0,0,0" L="131" o="324650" X="272" Y="260" T="12" H="10" /><S P="0,0,0.3,0.2,0,0,0,0" L="60" o="120801" X="271" Y="277" T="12" H="16" /></S><D /><O /></Z></C>]]--
- --[[Ainda está sendo feito, tem alguns "lixos" ainda no script e em breve vai ter sistemas melhores.]]--
- -- Tabelas
- mg={
- ["coins"]=0;
- ["exp"]=0;
- ["level"]=1;
- ["name"]="Sem Nome";
- ["player"]="Brenower";
- ["id"]=1;
- ["h"]=0;
- ["fexp"]=138;
- ["en"]=0;
- ["ag"]=0;
- ["es"]=0;
- ["lix"]=0;
- };
- predios={
- ["simples"]={
- ["1"]={["color"]=0x0C0C0C,["width"]=35,["height"]=110,["type"]=12;};
- ["2"]={["color"]=0x324650,["width"]=40,["height"]=10,["type"]=12;};
- ["3"]={["color"]=0x324650,["width"]=40,["height"]=10,["type"]=12;};
- ["4"]={["color"]=0x324650,["width"]=40,["height"]=10,["type"]=12;};
- ["5"]={["color"]=0x324650,["width"]=10,["height"]=130,["type"]=12;};
- ["6"]={["color"]=0x324650,["width"]=10,["height"]=130,["type"]=12;};
- };
- ["loja"]={
- ["1"]={["color"]=0x324650,["width"]=10,["height"]=91,["type"]=12;};
- ["2"]={["color"]=0x324650,["width"]=131,["height"]=10,["type"]=12;};
- ["3"]={["color"]=0xCBCBCB,["width"]=114,["height"]=84,["type"]=12;};
- ["4"]={["color"]=0xC5A365,["width"]=14,["type"]=13;};
- ["5"]={["color"]=0x675E4A,["width"]=119,["height"]=22,["type"]=12;};
- };
- ["loja-2"]={
- ["1"]={["color"]=0xFF0000,["width"]=40,["height"]=40,["type"]=12,["angle"]=10;};
- ["2"]={["color"]=0xFFFFFF,["width"]=40,["height"]=40,["type"]=12;};
- ["3"]={["color"]=0xFF0000,["width"]=40,["height"]=40,["type"]=12,["angle"]=-10;};
- ["4"]={["color"]=0x324650,["width"]=100,["height"]=100,["type"]=12;};
- ["5"]={["color"]=0x8BC9E8,["width"]=20,["height"]=32,["type"]=12;};
- }
- };
- -- Funções Extras
- function onBuy(id,x,y)
- if id == 1 and mg.coins >= 0 then
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x,y,predios.simples["2"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x+21,y+60,predios.simples["5"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x-23,y+60,predios.simples["6"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x-1,y+60,predios.simples["1"]);
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x,y+40,predios.simples["2"]);
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x,y+80,predios.simples["3"]);
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x,y+120,predios.simples["4"]);
- mg.h=mg.h+50;
- end
- if id == 2 and mg.coins >= 0 then
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x-1,y+45,predios.loja["3"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x-1,y+45,predios.loja["5"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x,y+15,predios.loja["4"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x,y,predios.loja["2"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x+61,y+42,predios.loja["1"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x-61,y+42,predios.loja["1"])
- mg.h=mg.h+50;
- end
- if id == 3 and mg.coins >= 0 then
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x,y,predios["loja-2"]["4"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x,y-24,predios["loja-2"]["2"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x-33,y-27,predios["loja-2"]["1"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x+37,y-27,predios["loja-2"]["3"])
- mg.id=mg.id+1;
- tfm.exec.addPhysicObject(mg.id,x-20,y+34,predios["loja-2"]["5"])
- mg.h=mg.h+100;
- end
- end
- -- Funções do tfm
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.newGame('<C Ca=""><P L="1600" /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="324650" X="0" Y="200" T="12" H="402" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="324650" X="1600" Y="200" T="12" H="407" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="324650" X="400" Y="400" T="12" H="10" /></S><D><P C="80808" Y="0" T="34" X="1" P="0,0" /><DS Y="357" X="146" /><P C="80808" Y="0" T="34" P="0,1" X="1600" /></D><O /></Z></C>');
- tfm.exec.setUIMapName("<ROSE>MegaCity <g>| <N>Moedas : <v>"..mg.coins.." <g>/<j> "..mg.h.."h <g>| <N>Nível : <v>"..mg.level.." <bl>/<j> "..mg.exp.." <bl>/ <vp>"..mg.fexp.."<p")
- onBuy(3,200,100)
- ui.addTextArea(1,"<b><n><font size='12'>Sua cidade precisa de uma fonte de energia!</font></b>",nil,14,26,nil,nil,0x990000,0,0.7,true)
- -- Loop
- temp={
- ["m"]=0;
- ["h"]=0;
- }
- function eventLoop()
- temp.m=temp.m+0.5;
- if temp.m > 59 then
- temp.h=temp.h+1;
- temp.m=0;
- mg.coins = mg.coins + mg.h;
- end
- if temp.h > 24 then
- temp.h=0;
- end
- local tjogo = nil;
- if string.len(temp.h) < 2 then
- tjogo = "0"..temp.h..":";
- end
- if string.len(temp.m) < 2 then
- tjogo = tjogo.."0"..math.floor(temp.m);
- else
- tjogo = tjogo..math.floor(temp.m);
- end
- tfm.exec.setUIMapName("<ROSE>MegaCity <g>| <N>Moedas : <v>"..mg.coins.." <g>/<j> "..mg.h.."h <g>| <N>Nível : <v>"..mg.level.." <bl>/<j> "..mg.exp.." <bl>/ <vp>"..mg.fexp.." <g>| <n>"..tjogo.."<p")
- end
Advertisement
Add Comment
Please, Sign In to add comment