This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- changes from advmode to fort safely and back (hopefully) | |
--[[Now to warn you about saving and loading in either game mode might lead | |
to some side issues, for saving in fort mode switching to adv mode needs the adv to be `bodyswap` | |
back in again. for Saving in Adv to switch to Fort mode you probably be safe-ish if the site. | |
isn't a nano fort or a site that isn't 3x3 small. otherwise the game will try to resize the map. | |
oh and switching to fort mode on any pre-gen site larger than 4x4 might implode one pc if | |
you don't have like 20 gigs of memory for the 16x16 embark size. | |
ok so this version of this script has be updated again so that caravans and visitors and migrants | |
could show up at any edge of the map... and maybe leave from any spot... of the z level you assign the site too. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function telekinesis(itemSource,itemTarget) | |
local curpos | |
if df.global.ui_advmode.menu==1 then | |
curpos=df.global.cursor | |
else | |
print ("No cursor located! uhh wouldn't had effected anything though.") | |
return | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local dlg=require("gui.dialogs") | |
local testciv=df.global.world.entities.all | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().available_civs,df.global.world.entities.all[112],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().available_civs,df.global.world.entities.all[302],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().available_civs,df.global.world.entities.all[234],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().available_civs,df.global.world.entities.all[134],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().available_civs,df.global.world.entities.all[32],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().available_civs,df.global.world.entities.all[274],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().available_civs,df.global.world.entities.all[47],"id") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jump(unitSource,unitTarget) | |
local curpos | |
if df.global.ui_advmode.menu==1 then | |
curpos=df.global.cursor | |
else | |
print ("No cursor located! You would have slammed into the ground and exploded.") | |
return | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function JUMP2() | |
--for k,v in pairs(df.global.world.proj_list.next.item) do | |
--printall(df.global.world.vehicles.active) | |
--S=0+getline() | |
--printall(df.global.world.vehicles.active[0]) | |
--df.global.world.vehicles.active[0].speed_y=(-900000) | |
df.global.world.proj_list.next.item.accel_z=(20000) | |
df.global.world.proj_list.next.item.speed_z=(20000) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getxyz() -- this will return pointers x,y and z coordinates. | |
local x=df.global.cursor.x | |
local y=df.global.cursor.y | |
local z=df.global.cursor.z | |
return x,y,z -- return the coords | |
end | |
function getCreatureAtPos(x,y,z) -- gets the creature index @ x,y,z coord | |
--local x,y,z=getxyz() --get 'X' coords | |
local vector=df.global.world.units.all -- load all creatures | |
for i = 0, #vector-1 do -- look into all creatures offsets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--create unit at pointer or given location and with given civ (usefull to pass -1 for enemy). Usage e.g. "spawnunit DWARF 0 Dwarfy" | |
--[=[ | |
Creature (ID), caste (number), name, x,y,z , civ_id(-1 for enemy, optional) for spawn. | |
Made by warmist, but edited by Putnam for the dragon ball mod to be used in reactions | |
note that it's extensible to any autosyndrome reaction to spawn anything due to this; to use in autosyndrome, you want \COMMAND spawnunit CREATURE caste_number name \LOCATION | |
TODO: | |
birth time | |
death time | |
real body size | |
blood max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object_event_add(Character,ev_step,ev_step_normal,' | |
repeat(global.frameskip) | |
{ | |
// Do movement | |
if(taunting) | |
{ | |
hspeed *= delta_mult_skip(baseFriction); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Roll The Dice server plugin by lorgan | |
// current error the new sentry drop causes the plugin to add extra speed and send it plumeting to it's doom, also needs to be server sent so that players can see the orbital strike cannons. | |
global.canRoll = true; | |
global.effects = 28; | |
global.effect[0] = " Exploded!"; | |
global.effect[1] = " Turned into a timebomb! Detonation in 10 seconds!" | |
global.effect[2] = " froze for 10 seconds!"; | |
global.effect[3] = " Lost health!" | |
global.effect[4] = " can't jump for 20 seconds!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (player.class == CLASS_MEDIC || player.class == CLASS_ENGINEER || player.class == CLASS_SPY) && taunting{ | |
if tauntindex == 0 or tauntindex == tauntlength { | |
//Nwith(SentryTurret) team = 3; | |
effect = noone; | |
vspeed = 15; | |
moveStatus = 1; | |
} | |
} | |
if (player.class == CLASS_SOLDIER || player.class == CLASS_DEMOMAN || player.class == CLASS_SNIPER || player.class == CLASS_MEDIC||player.class == CLASS_PYRO ){ |
NewerOlder