Boogiepop210 Posted August 23, 2022 Author Share Posted August 23, 2022 added and single object version of the replace prefab command Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1595587 Share on other sites More sharing options...
Boogiepop210 Posted August 29, 2022 Author Share Posted August 29, 2022 I want to thank @hhh2 @Friendly Grassfor showing me how to 1. Do area component commands 2. For encouraging me to look at other forums for more commands 3. Helping me find scripts 4. Do custom commands. I would've been able to make the list of 30ish commands without you. My creative servers are working good so far though sadly some commands are so long I can't share them. I'm gonna find out how to use math.random/math.sin etc. Hopefully you're having an good day. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596174 Share on other sites More sharing options...
hhh2 Posted August 29, 2022 Share Posted August 29, 2022 I'm glad I could spark your curiosity. I think you would or already do enjoy programming. If you haven't already, check out this web resource ( https://www.lua.org/pil/contents.html ) for an in-depth study of Lua. It is from 2003 but it's free for personal use. As an aside, you might to google "Entity Component System", because many games use it. I hope your having a good day too. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596205 Share on other sites More sharing options...
Boogiepop210 Posted August 29, 2022 Author Share Posted August 29, 2022 On 8/29/2022 at 4:31 AM, hhh2 said: I'm glad I could spark your curiosity. I think you would or already do enjoy programming. If you haven't already, check out this web resource ( https://www.lua.org/pil/contents.html ) for an in-depth study of Lua. It is from 2003 but it's free for personal use. As an aside, you might to google "Entity Component System", because many games use it. I hope your having a good day too. Sadly they didn't do that much of an explanation or even give an medium Example on math.random, I wanted to make an rainbow effect and I need to know how to use math random better to do that. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596265 Share on other sites More sharing options...
Boogiepop210 Posted August 30, 2022 Author Share Posted August 30, 2022 Didn't work lol Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596270 Share on other sites More sharing options...
SadeceAtakan Posted August 30, 2022 Share Posted August 30, 2022 I remember there was some post in these forums with a bunch of cool commands like "spawning a punchable tree that gives bananas" and activating the epileptic "rave mode". Does anyone know where I can find it? That was amazing. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596336 Share on other sites More sharing options...
Boogiepop210 Posted August 30, 2022 Author Share Posted August 30, 2022 Hmm idk but that seems silly On 8/30/2022 at 8:42 AM, SadeceAtakan said: I remember there was some post in these forums with a bunch of cool commands like "spawning a punchable tree that gives bananas" and activating the epileptic "rave mode". Does anyone know where I can find it? That was amazing. Hmm well the tree thing I may be able to do local evergreen = c_spawn("evergreen") evergreen:AddComponent("health") evergreen.components.health:SetMaxHealth(1500) evergreen:AddComponent("combat") evergreen:AddComponent("named") evergreen.components.named:SetName("banana tree?") evergreen:ListenForEvent("attacked", function() local x,y,z = evergreen.Transform:GetWorldPosition() c_spawn("cave_banana").Transform:SetPosition(x + math.random(-2,2), y + 10, z + math.random(-2,2)) end) Edit: just changed it should work now. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596347 Share on other sites More sharing options...
Falkenpelz Posted August 31, 2022 Share Posted August 31, 2022 21 hours ago, Insertnamehere2 said: Hmm idk but that seems silly Hmm well the tree thing I may be able to make. c_spawn("evergreen"):AddComponent("health) c_select().components.health:SetMaxHealth(300) local x,y,z =Transform:GetWorldPosition() c_select():ListenForEvent("onattacked") SpawnPrefab("banana").Transform:SetPosition(x,5,z) this is my first time doing this I'll try this out and if it works, you deserve a medal. That's exactly the silly detailed stuff we need to establish custom DST mapmaking more Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596482 Share on other sites More sharing options...
Boogiepop210 Posted August 31, 2022 Author Share Posted August 31, 2022 6 hours ago, Falkenpelz said: I'll try this out and if it works, you deserve a medal. That's exactly the silly detailed stuff we need to establish custom DST mapmaking more It doesn't work So I made it so it spawned and actually had health but trigger part idk how to do I'll try to look Also I found this in the evergreen area which may help with rainbow effect local color = .5 + math.random() * .5 ThePlayer.AnimState:SetMultColour(color, color, color, 1) Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596509 Share on other sites More sharing options...
Bumber64 Posted September 1, 2022 Share Posted September 1, 2022 function rainboweffect(inst) local r, g, b = math.random(), math.random(), math.random() inst.AnimState:SetAddColour(r, g, b, 0) end ThePlayer:DoPeriodicTask(0.2, rainboweffect) Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596533 Share on other sites More sharing options...
Boogiepop210 Posted September 1, 2022 Author Share Posted September 1, 2022 58 minutes ago, Bumber64 said: function rainboweffect(inst) local r, g, b = math.random(), math.random(), math.random() inst.AnimState:SetAddColour(r, g, b, 0) end ThePlayer:DoPeriodicTask(0.2, rainboweffect) Nice, I thought it was like this for starting one local rainboweffect = function(inst) I guess I readed wrong Rainbowlight function rainbowlight(inst) local light = inst.entity.AddLight() local r, g, b = math.random(), math.random(), math.random() light:SetColour(r, g, b) end c_select():DoPeriodicTask(0.2,rainbowlight) Apparently I cant make an light loop as this crashes Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596535 Share on other sites More sharing options...
hhh2 Posted September 1, 2022 Share Posted September 1, 2022 20 hours ago, Falkenpelz said: I'll try this out and if it works, you deserve a medal. That's exactly the silly detailed stuff we need to establish custom DST mapmaking more Agreed. Out of all the mods on the workshop, there really aren't that many custom map/adventure/gamemode type things and that makes me sad Moreover, DST world generation is so stale It's perfect for French Toast. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596570 Share on other sites More sharing options...
kipper0k Posted September 1, 2022 Share Posted September 1, 2022 20.08.2022 в 12:54, hhh2 сказал: О, я должен упомянуть, что эта функция также заменяет предметы в инвентарях игроков (поэтому на втором изображении у ног Уикера была фрикаделька). Еще одна проверка может быть вставлена в начале цикла for, чтобы пропустить прошлые элементы инвентаря, если это нежелательно: Применить эффект замораживания ко всему, кроме игрока. Я не проверял это, но, кажется, все в порядке: вместо ThePlayer лучше использовать local player = ConsoleCommandPlayer() 21 час назад, Фалькенпелц сказал: Я попробую это, и если это сработает, ты заслуживаешь медаль. Это как раз то, что нам нужно, чтобы создать пользовательскую карту DST. local tree = c_spawn("evergreen") local _chop_tree = tree.components.workable.onwork local chop_tree = function(inst, chopper, ...) if math.random() >= 0 then LaunchAt(c_spawn("pinecone"), inst, chopper, 0.5, 1.5, 1, math.random(0, 359)) end return _chop_tree(inst, chopper, ...) end tree.components.workable:SetOnWorkCallback(chop_tree) чтобы изменить шанс, просто измените ноль на интересующее вас число Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596575 Share on other sites More sharing options...
Boogiepop210 Posted September 1, 2022 Author Share Posted September 1, 2022 30 minutes ago, kipper0k said: вместо ThePlayer лучше использовать local player = ConsoleCommandPlayer() local tree = c_spawn("evergreen") local _chop_tree = tree.components.workable.onwork local chop_tree = function(inst, chopper, ...) if math.random() >= 0 then LaunchAt(c_spawn("pinecone"), inst, chopper, 0.5, 1.5, 1, math.random(0, 359)) end return _chop_tree(inst, chopper, ...) end tree.components.workable:SetOnWorkCallback(chop_tree) чтобы изменить шанс, просто измените ноль на интересующее вас число I sadly can't understand but that looks like it'd work if I replace pinecone with banana It'd work. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596577 Share on other sites More sharing options...
kipper0k Posted September 1, 2022 Share Posted September 1, 2022 4 minutes ago, Insertnamehere2 said: К сожалению, я не могу понять, но похоже, что это сработает, если я заменю сосновую шишку бананом. sure we just intercept the current function that is called when chopping the tree Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596579 Share on other sites More sharing options...
Boogiepop210 Posted September 1, 2022 Author Share Posted September 1, 2022 It worked great, well we know who the medal goes to. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596580 Share on other sites More sharing options...
kipper0k Posted September 1, 2022 Share Posted September 1, 2022 thx Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596581 Share on other sites More sharing options...
Boogiepop210 Posted September 2, 2022 Author Share Posted September 2, 2022 ------------------------------------------------------------------------------------------------------- function sandrun(inst) local x,y,z = inst.Transform:GetWorldPosition() local prefab = c_spawn("sandspike_tall") prefab.Transform:SetPosition(x,y,z) end c_select():DoPeriodicTask(0.1, sandrun) ------------------------------------------------------------------------------------------------------ function c_earthquake() TheWorld:PushEvent("ms_miniquake", { rad = 20, num = 20, duration = 1, target = c_select() }) end Summons an earthquake on object under cursor. Use c_earthquake() in console after to use. Only usable in caves. ------------------------------------------------------------------------------------------------------- function c_dangerousstuff(spacing) local dangerous_stuff = {"largeguard_alterguardian_projectile", "sandspike", "gestalt_alterguardian_projectile", "mushroombomb"} d_spawnlist(dangerous_stuff, 3) end --------------------------------------------------------------------------------------------------- function gunpowderain(inst) LaunchAt(c_spawn("gunpowder", 3), inst, nil, math.random(1, 8), 0.5, 1.5, math.random(0, 359)) end c_select():DoPeriodicTask(0.1, gunpowderain) -------------------------------------------------------------------------------------------------------- function c_movenearby(radius, x,y,z) radius = radius or 15 local targets = TheSim:FindEntities(x,y,z, radius,nil,nil) for _,t in pairs(targets) do if t ~= AllPlayers[1] then t.Transform:SetPosition(x,y,z) end end end this command moves stuff to your mouse. (Do c_movenearby(radius)) after the first command too use. -------------------------------------------------------------------------------------------------------- function c_radius(radius, num, lifetime) radius = radius or 4 num = num or math.max(5, radius*2) lifetime = lifetime or 10 local delta_theta = PI2 / num local pt = ConsoleWorldPosition() for i = 1, num do local p = SpawnPrefab("flint") p.Transform:SetPosition(pt.x + radius * math.cos( i*delta_theta ), 0, pt.z - radius * math.sin( i*delta_theta )) p:DoTaskInTime(lifetime, p.Remove) end end -------------------------------------------------------------------------------------------------------- function c_tagsetup() ThePlayer:AddTag("pocketwatchcaster") ThePlayer:AddTag("fastpicker") ThePlayer:AddTag("fastbuilder") ThePlayer:AddTag("expertchef") ThePlayer:AddTag("ignoresspoilage") ThePlayer:AddTag("stronggrip") ThePlayer:AddTag("chessfriend") ThePlayer:AddTag("spiderwhisperer") ThePlayer:AddTag("woodcutter") end -------------------------------------------------------------------------------------------------------- function c_csetup(amount, period, number, num, resist, resistance) ThePlayer.components.health:StartRegen(amount, period) ThePlayer.components.hunger:SetMax(number) ThePlayer.components.sanity:SetMax(num) ThePlayer.components.grogginess:SetResistance(resist) ThePlayer.components.freezable:SetResistance(resistance) ThePlayer.components.playerlightningtarget:SetHitChance(0) end --------------------------------------------------------------------------------------------------- function c_workmultiplier(multiplier, multiplier, multiplier) ThePlayer.components.workmultiplier:AddMultiplier(ACTIONS.CHOP, multiplier, ThePlayer) ThePlayer.components.workmultiplier:AddMultiplier(ACTIONS.MINE, multiplier, ThePlayer) ThePlayer.components.workmultiplier:AddMultiplier(ACTIONS.HAMMER, multiplier, ThePlayer) end -------------------------------------------------------------------------------------------------- local evergreen = c_spawn("deciduoustree") evergreen:AddComponent("health") evergreen.components.health:SetMaxHealth(1500) evergreen:AddComponent("combat") evergreen:AddComponent("named") evergreen.components.named:SetName("banana tree? Su--") function OnAttacked(inst, data) if data.attacker and not data.attacker.components.health:IsDead() then LaunchAt(c_spawn("bananajuice"), inst, nil, math.random(1,8), 1, 0.1, 360) end evergreen:ListenForEvent("attacked", OnAttacked) -------------------------------------------------------------------------------------------------- Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1596640 Share on other sites More sharing options...
Boogiepop210 Posted October 2, 2022 Author Share Posted October 2, 2022 local snotsword = c_spawn("nightsword") snotsword:AddComponent("weapon") snotsword.components.weapon:SetDamage(50) snotsword.components.weapon:SetRange(5,7) snotsword.components.weapon:SetProjectile("spat_bomb") snotsword:AddTag("snotbomb") snotsword.AnimState:SetMultColour(1/255,255/255,1/255,1) --------------------------------------------------------------------------------------------------- local fireball = c_spawn("nightsword") fireball:AddComponent("named") fireball.components.named:SetName("snipor") fireball:AddComponent("weapon") fireball.components.weapon:SetDamage(50) fireball.components.weapon:SetRange(100,120) fireball.components.weapon:SetProjectile("fire_projectile") fireball.components.equippable.dapperness = 2 -------------------------------------------------------------------------------------------------- local poopsword = c_spawn("nightsword") poopsword:AddComponent("named") poopsword.components.named:SetName("torture") poopsword:AddComponent("weapon") poopsword.components.weapon:SetDamage(1) poopsword.components.weapon:SetRange(8,10) poopsword.components.weapon:SetProjectile("monkeyprojectile") poopsword.AnimState:SetMultColour(150/255, 200/255, 200/255, 1) -------------------------------------------------------------------------------------------------- local sniper = c_spawn("nightsword") sniper:AddComponent("projectile") sniper.components.projectile:SetSpeed(3) sniper.components.projectile:SetHoming(false) sniper.components.weapon:SetRange(100, 120) sniper.components.weapon:SetDamage(80) sniper.components.projectile:SetOnHitFn(sniper.Remove) -------------------------------------------------------------------------------------------------- local spear = c_spawn("wilson") spear:AddComponent("weapon") spear:AddComponent("projectile"); spear.components.projectile:SetSpeed(10); spear:AddTag("projectile"); spear:AddTag("thrown"); spear.components.weapon:SetRange(100,120);spear:AddComponent("equippable");spear:AddComponent("inventoryitem");spear.components.equippable.equipslot = EQUIPSLOTS.HANDS;spear.components.weapon:SetDamage(999999999); --------------------------------------------------------------------------------------------------- local smite = c_spawn("frog"); smite.components.health:StartRegen(-1.5, 0);smite.components.lootdropper:SetLoot({"lightning", "alterguardian_phase3trapprojectile", "antlion_sinkhole"}); smite.components.lootdropper:AddRandomLoot("shadowmeteor", 5) smite.components.lootdropper:AddRandomLoot("houndfire", 5);smite.components.lootdropper:AddRandomLoot("tornado", 5);smite.components.lootdropper.numrandomloot = 50; Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1600044 Share on other sites More sharing options...
SadeceAtakan Posted October 14, 2022 Share Posted October 14, 2022 On 8/30/2022 at 6:42 PM, SadeceAtakan said: I remember there was some post in these forums with a bunch of cool commands like "spawning a punchable tree that gives bananas" and activating the epileptic "rave mode". Does anyone know where I can find it? That was amazing. I finally found the cool command list that I mentioned! https://docs.google.com/document/u/0/d/16WUuf54u5cBQXmVH6R2QHMmb-uvjqEsx_aKtN2tDMiE/mobilebasic Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1602855 Share on other sites More sharing options...
Boogiepop210 Posted October 14, 2022 Author Share Posted October 14, 2022 5 hours ago, SadeceAtakan said: I finally found the cool command list that I mentioned! https://docs.google.com/document/u/0/d/16WUuf54u5cBQXmVH6R2QHMmb-uvjqEsx_aKtN2tDMiE/mobilebasic This is amazing... Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1602886 Share on other sites More sharing options...
Boogiepop210 Posted November 27, 2022 Author Share Posted November 27, 2022 Testing an command radius = 7.5 num = 6 local delta_theta = PI2 / num local pt = ConsoleWorldPosition() for i = 1, num do local p = SpawnPrefab("gunpowder") p.Transform:SetPosition(pt.x + radius * math.cos( i*delta_theta ), 0, pt.z - radius * math.sin( i*delta_theta )) p.components.burnable:Ignite() function(inst) p:DoPeriodicTask(0.1, function(inst) local x,y,z = inst.Transform:GetWorldPosition() local prefab = c_spawn("sandspike_tall") prefab.Transform:SetPosition(x,y,z) end) end I'm see if it works if it doesn't help with be appreciated. Edit: didn't work but I just needed to edit it an little. function c_snake(prefab, prefab2 radius, num, lifetime, period) radius = radius or 7.5 num = num or 6 lifetime = lifetime or 10 period = period or 0.2 local delta_theta = PI2 / num local pt = ConsoleWorldPosition() for i = 1, num do local p = SpawnPrefab(prefab) p.Transform:SetPosition(pt.x + radius * math.cos( i*delta_theta ), 0, pt.z - radius * math.sin( i*delta_theta )) p:DoTaskInTime(lifetime, p.remove) p:DoPeriodicTask(period, function(inst) local x,y,z = inst.Transform:GetWorldPosition(); local s = c_spawn(prefab2); if s == nil then return nil end; s.Transform:SetPosition(x,y,z) end) end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ local bomb = c_spawn("gunpowder");bomb.components.explosive.explosiverange = 10;bomb.components.explosive.explosivedamage = 750;bomb.components.explosive.buildingdamage = 500; Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1612376 Share on other sites More sharing options...
Parusoid Posted November 27, 2022 Share Posted November 27, 2022 On 8/19/2022 at 2:01 AM, Insertnamehere2 said: c_select()c_give("prefab") how do you indicate which player to give the item? Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1612385 Share on other sites More sharing options...
Boogiepop210 Posted November 27, 2022 Author Share Posted November 27, 2022 1 hour ago, Parusoid said: how do you indicate which to give the item? Put your cursor an player and it'll give the prefab that you put in the ("") to that player. Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1612389 Share on other sites More sharing options...
Parusoid Posted November 27, 2022 Share Posted November 27, 2022 11 hours ago, Insertnamehere2 said: Put your cursor an player and it'll give the prefab that you put in the ("") to that player. What If im not nearby, how do I select them? Link to comment https://forums.kleientertainment.com/forums/topic/142700-looking-for-rare-commands/page/2/#findComment-1612446 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.