Stone Story RPG

Stone Story RPG

View Stats:
Yuan Aug 31, 2023 @ 6:22am
2
A basic universal script
The achievement had me CTRL-A CTRL-C my script anyway, so I might as well post it.

I have a few weapons but by far not all I'd want to have, please adjust to your loadout.
There's some basic dodging as well.
var harvesting = 0 var burn_runes=0 //>`0,0,buffs=@buffs.string@ //>`0,1,debuffs=@debuffs.string@ //>`0,2,foe buffs=@foe.buffs.string@ //>`0,3,foe debuffs=@foe.debuffs.string@ import fishing //import cosmetics/PetBoo import UI/BetterInfo2 import UI/FreeChestTracker //Rocky Plateau ?loc=rocky ?foe=boss equipR compound shield ?foe.debuffs.string!dot equipL fire wand : equipL aether hammer ?hp<maxhp equipL vigor wand equipR vigor shield //Deadwood Canyon ?loc=valley equip repeating crossbow ?foe=immune_to_ranged equip heavy hammer ?foe.distance<10 activate R ?foe.distance>10&item.GetCooldown("bash")<=0 equipR bashing shield equipL aether hammer ?hp<maxhp&foe!immune_to_ranged equipL vigor wand equipR vigor shield ?foe.distance<10&item.GetCooldown("mind")<=0 equipL mind //Caves of Fear ?loc=caves equip repeating crossbow ?foe!boss & hp<maxhp equipL vigor wand equipR vigor shield ?foe.distance<10&item.GetCooldown("mind")<=0 equip mind ?foe=boss equip heavy crossbow ?foe=boss&foe.state=133& ^item.GetCooldown("mind")<=0 equip mind //Mushroom Forest ?loc=fungus ?foe=boss ?foe.debuffs.string!dot equipR compound shield equipL fire wand :?foe.armor>0 equip heavy hammer ?foe.distance<11&item.GetCooldown("hammer")<1 activate R : equipL poison sword equipR compound shield : equipL poison sword equipR compound shield ?hp<maxhp equipL vigor wand equipR vigor shield ?foe.distance>10&item.GetCooldown("bash")<=0 equipR bashing shield equipL poison sword ?foe!boss & hp<maxhp equipL vigor wand equipR vigor shield ?foe.distance<15&item.GetCooldown("mind")<=0 equipL mind ?foe=boss&foe.state=33 equipL mind //Haunted Halls ?loc=undead equip vigor staff ?hp<maxhp equipL vigor wand equipR vigor shield ?foe=boss&foe.state=32&foe.time>=45 equipL mind //Boiling Mine ?loc=mine equipL aether hammer equipR compound shield ?foe!boss&hp<maxhp equipR vigor shield ?foe!boss&foe.count>10 equip heavy hammer ?foe.distance<10 activate R ?foe=boss&foe.armor>0&foe.state=33 ?foe.distance>10&item.GetCooldown("bash")<=0 equipR bashing shield equipL aether hammer : equip heavy hammer ?foe.distance<10 activate R ?foe=boss&foe.state=2 ?hp<maxhp equip vigor wand : equip heavy crossbow ?foe=boss&hp<maxhp&foe.state=33 equip vigor wand ?foe=boss&foe.state=32&foe.time=30 equip mind ?foe.distance>10&item.GetCooldown("bash")<=0 ^&foe!boss equipR bashing shield equipL aether hammer //Icy Ridge ?loc=ridge equipL fire wand equipR compound shield ?(foe=pillar|foe=wall)&hp<maxhp equipL vigor wand equipR vigor shield ?foe.distance<10&item.GetCooldown("mind")<=0 equip mind ?foe.armor>0 equip heavy hammer ?foe.distance<=10 activate R ?foe=boss&hp<maxhp equipR vigor shield equipL vigor wand //Temple of Nagaraja ?loc=temple ?hp<maxhp equipL vigor wand equipR vigor shield : equipR compound shield equipL ice big sword ?foe.distance>10&item.GetCooldown("bash")<=0 ^&foe.state!112 equipR bashing shield ?foe=boss ?foe.debuffs.string!dot equip fire wand ?foe.state=112&foe.time=45 equipl mind //skeleton arm override ?item.GetCooldown("skeleton_arm") <= 0 ^&foe!immune_to_physical&foe!boss equip skeleton arm ?item.CanActivate("skeleton_arm") ^&buffs.string="pick_pocket:1" activate R //Summon Fire elemental, farm rune burn damage ?summon.count=0&item.CanActivate()&time>30&foe. ^distance>30 equipL fire talisman activate L :?foe.debuffs,string="ignition:10" ^&item.GetCooldown("cinderwisp") ^&burn_runes=1 activate cinderwisp //universal harvest ?harvesting=1 ?harvest=Boulder&harvest.distance<1 equip shovel ?harvest=Tree&harvest.distance<10 equipR hatchet equipL ouroboros ?harvest.distance=4 activate R //universal pickup ?pickup.distance<10 equip star //Spawner kill ?foe.count>10&item.GetCooldown("blade")<=0 equip blade activate R
Last edited by Yuan; Aug 31, 2023 @ 6:23am
< >
Showing 1-15 of 15 comments
A99RE55OR Sep 4, 2023 @ 2:27pm 
:steamthumbsup: :steamthumbsup: :steamthumbsup:
Yuan Sep 5, 2023 @ 1:29pm 
Here's a bit of an update. Still working on it, I'll probably rework it when I have a full set of weapons.
>( `m´ var harvesting = 1 ?loc.loop&debuffs.count>0 activate potion >`0,0,buffs=@buffs.string@ >`0,1,debuffs=@debuffs.string@ >`0,2,foe buffs=@foe.buffs.string@ >`0,3,foe debuffs=@foe.debuffs.string@ //import fishing //import cosmetics/PetBoo import UI/BetterInfo2 import UI/FreeChestTracker //Rocky Plateau ?loc=rocky equipR compound shield ?foe.debuffs.string!dot&foe.buffs.string!prot equipL fire wand : ?foe.buffs.string!aether equipL aether hammer : equipL poison sword ?hp<maxhp equipL vigor sword //Deadwood Canyon ?loc=valley equip repeating crossbow ?foe=immune_to_ranged equip heavy hammer ?foe.distance<10 activate R ?foe.distance>10&item.GetCooldown("bash")<=0 equipR bashing shield equipL aether hammer ?hp<maxhp equipL vigor sword equipR vigor shield ?foe=boss equip heavy crossbow //Caves of Fear ?loc=caves equip repeating crossbow ?foe=boss equip heavy crossbow ?foe.state=133&item.GetCooldown("mind")<=0 equip mind :?hp<maxhp equipL vigor wand equipR vigor shield ?foe.distance<10&item.GetCooldown("mind")<=0 equip mind //Mushroom Forest ?loc=fungus equipL poison sword equipR compound shield ?foe=boss ?foe.armor>0 equip heavy hammer ?foe.distance<11&item.GetCooldown("hammer")<1 activate R ?foe.distance>10&item.GetCooldown("bash")<=0 equipR bashing shield equipL poison sword ?foe.count>10 equip heavy hammer ?foe.distance<11&item.GetCooldown("hammer")<1 activate R ?hp<maxhp&debuffs.string!puff equipL vigor sword equipR vigor shield ?(foe=puff|foe=epic)&foe=boss ?foe.distance<10&item.GetCooldown("mind")<1 equipL mind : equip heavy crossbow ?foe=ant equipl vigor wand equipr moon //Haunted Halls ?loc=undead equip vigor staff ?hp<maxhp&loc!boss equipL vigor wand equipR moon ?foe.distance<10&item.GetCooldown("mind")<=0 equipL mind ?foe=boss&foe.state=32&foe.time>=45& ^item.GetCooldown("mind")<=0 equipL mind ?foe=boss equipL vigor wand equipR fire wand ?foe=boss&hp<maxhp equipL vigor wand equipR vigor sword //Boiling Mine ?loc=mine equipL aether hammer equipR compound shield ?foe=boss ?foe.state=2 ?hp<maxhp equipL moondial equipR vigor wand : equip heavy crossbow :?foe.state=32 ?foe.time=30 equipL mind : ?foe.distance>10 equipL aether hammer equipR bashing shield : ?foe.armor>0 equip heavy hammer activate R : equipL aether hammer equipR big ice sword ?hp<maxhp equipL vigor wand equipR vigor sword : ?hp<maxhp ?foe.armor<=0 equipL vigor sword equipR vigor shield ?foe.distance>10&item.GetCooldown("bash")<=0 ^&foe.distance<30 equipR bashing shield ?foe.count>10 equip heavy hammer ?foe.distance<10 activate R //Icy Ridge ?loc=ridge equipL fire wand equipR compound shield ?foe=spawner|foe=wall&hp<maxhp equipL vigor sword equipR vigor shield ?foe.armor>0 equip heavy hammer ?foe.distance<=10 activate R ?foe=boss&hp<maxhp equipR vigor shield equipL vigor sword ?foe=boss&foe.distance>2&foe.distance<7 equip shovel ?foe=boss&foe.distance>7& ^item.GetCooldown("bash")<=0 equipr bash //Temple of Nagaraja ?loc=temple equipR compound shield equipL ice big sword ?hp<maxhp&foe!boss equipL vigor sword equipR vigor shield ?foe.distance>10&item.GetCooldown("bash")<=0 ^&foe.state!112 equipR bashing shield ?foe=boss equipL big ice sword equipR vigor sword ?debuffs.count>10 equip heavy hammer ?hp<maxhp&foe.state<103 equipL big ice sword equipR vigor shield ?foe.state=112&foe.time=45 equipl mind ?foe=acronian equip heavy crossbow ?hp<maxhp equipL ice sword equipR vigor sword //Auto regen ?foe.count<1 ?hp<maxhp equipL ouro : equipL triskelion equipR compound shield //Bardiche smash ?foe=boss&foe.distance<=8&(item.GetCooldown( ^"bardiche")<1|item.GetCooldown("bardiche")>870) ^&foe.armor<1 equip bardiche activate R //Hammer smash ?foe=boss&foe.distance<=8&(item.GetCooldown( ^"hammer")<1|item.GetCooldown("hammer")>630) ^&foe.armor>1 equip hammer activate R //skeleton arm override ?item.GetCooldown("skeleton_arm") <= 0 ^&foe!immune_to_physical&foe!boss ^&foe.distance<30 equip skeleton arm ?item.CanActivate("skeleton_arm") ^&buffs.string="pick_pocket:1" activate R //Summon Fire elemental ?summon.count=0&item.CanActivate()&time>30&foe. ^distance>30 equipL fire talisman activate L //spam mask ?foe.count=1&(item.GetCooldown("mask")<=0 ^|item.GetCooldown("mask")>2370) ^&foe=boss&foe.state=33 ^&(foe=enoki|loc!fungus) equipR mask ?time%5=0 activate R //universal harvest ?harvesting=1 ?harvest=Boulder&harvest.distance<1 equip shovel ?harvest=Tree&harvest.distance<10 equipR hatchet equipL ouroboros ?harvest.distance<5 activate R //universal pickup ?pickup.distance<10 equip star //Spawner kill ?foe.count>10&item.GetCooldown("blade")<=0 equip blade activate R
Pwyll Crusader Oct 5, 2023 @ 12:26pm 
could you please describe your weapons? e.g. vigor sword D or dL and so on for others
Mharr Oct 28, 2023 @ 5:58am 
Hey thanks so much for this, it's a great intro to the general syntax and possibilities for those who learn better by code example than formal documentation. This is one of the best offline systems in any incremental, but the game does almost zero tutorialising.

>( `m´
Is this part a copy paste glitch?
Last edited by Mharr; Oct 28, 2023 @ 6:09am
Yuan Oct 29, 2023 @ 2:07am 
Originally posted by Mharr:
>( `m´
Is this part a copy paste glitch?
No that's an silly face.



Originally posted by Pwyll Crusader:
could you please describe your weapons? e.g. vigor sword D or dL and so on for others
Well, I am still not finished with collecting every single weapon, but I plan to have:
Once of each / two of each weapon (depends on if the weapon is one or two-handed) and element combination D with enchantment on D, one shield A each
Another full set in vigor dL for healing purposes and a shield aL
A wand of the three debuffs dI, dF and dP.

I'm distinguishing regular weapons by making one gold, so I can use e.g. equipL gold sword, equipR -gold sword.
I'll be doing the same for the lifesteal weapons with shiny status.
You can get both with slightly aggressive referral code posting, you'll probably be done before getting all weapons.

I'm working on a new version that completely does away with scripting each level, just a bunch of functions to assemble a string for the optimal weapon and automatic dodging etc.
Will take me a while longer, but I imagine it like this:

Loc=whatever
shields=1
check_element()
check_weapon()
equip()
if hp<maxhp
equip_heal_set()
dodge()
skeleton_arm()
(...)
Foe=specific_boss
boss_script

It's halfway done, but I can't debug every location without having every weapon, as string variable equipping seems to not pick the next best weapon, just exact matches.
Last edited by Yuan; Oct 29, 2023 @ 2:10am
Yuan Nov 5, 2023 @ 4:36am 
Current version of that automatic detector script:

>( `m´ var harvest_enable = 1 var element = 0 var weapon = 0 var heal = 0 var shield = 0 var string = 0 var debug = 1 var debuff_hand = 0 var skel_lvl = "pick_pocket:2" // put your skeleton arm max buffs here ?loc.loop&debuffs.count>0 activate potion debuff_hand = 0 ?debug = 1 >`0,0,buffs=@buffs.string@ >`0,1,debuffs=@debuffs.string@ >`0,2,foe buffs=@foe.buffs.string@ >`0,3,foe debuffs=@foe.debuffs.string@ //debuffs func dot() ?foe.debuffs.string!dot ?debuff_hand=0 equipL wand dF debuff_hand=1 : equipr wand dF func ice() ?foe.debuffs.string!chill ?debuff_hand=0 equipL wand dI debuff_hand=1 : equipr wand dI func poison() ?foe.debuffs.string!damage ?debuff_hand=0 equipL wand dP debuff_hand=1 : equipr wand dP func equip_weapons() //equip weapon //differentiate two one-handed weapons //using one golden, one not. //diff. two healing weapons using //one shiny, one not ?debug=1 >`0,4,init weapon string = @string@ ?shield = 1 & (weapon = crossbow ^weapon = staff) weapon = wand ?weapon = crossbow ?foe.hp+foe.armor<50 element = repeating ?heal=1 equip vigor crossbow dL : string = element+" "+weapon+" D" equip @string@ : ?heal=1 string = "shiny vigor " +weapon+ " dL" equipL @string@ string = "-"+string equipR @string@ ?shield=1 equipR vigor shield ah : string = "golden "+element+" "+weapon ^+" D" equipL @string@ string = "-"+string equipR @string@ ?shield=1 ?element=repeating equipr compound shield : string = element+" shield A" equipR @string@ ?debug=1 >`0,5,final weapon string = @string@ //movement and special attack functions func dodge() //mind stone dodge ?item.GetCooldown("mind")<=0 equipr mind func ram() //shield dash ?item.GetCooldown("bash")<=0 equipr bash : equipr dash func blade(nr) //blade special ?foe.count>nr&item.GetCooldown("blade")<=0 equip blade activate R func harvesting() //harvest trees + stones ?harvest=Boulder&harvest.distance<1 equip shovel ?harvest=Tree&harvest.distance<10 equipR hatchet ?hp<maxhp equipL ouroboros : equipL moon ?harvest.distance<5 activate R func bsmash() //bardiche special ?foe.distance<=7&(item.GetCooldown( ^"bardiche")<1|item.GetCooldown("bardiche")>870) ^&foe.armor<1 equip bardiche activate R func hsmash() //hammer special ?foe.distance<=8&(item.GetCooldown( ^"hammer")<1|item.GetCooldown("hammer")>630) ^&foe.armor>1 equip heavy hammer activate R func ooc() //out of combat regen + shield ?foe.distance>22 ?hp<maxhp equipL ouro : equipL triskelion ?element = "repeating" equipR compound shield : string = element + " shield max A golden" equipR @string@ func pickup_loose() //pick up loose items ?pickup.distance<10 equipr star func steal() //skeleton arm steal //adjust to arm level ?item.GetCooldown("skeleton_arm") <= 0 ^&foe!une_to_physical^&foe.distance<10 equip skeleton arm ?item.CanActivate("skeleton_arm") ^&buffs.string=skel_lvl activate R func fireelem() //Summon Fire elemental ?summon.count=0&item.CanActivate()&time>30& ^foe.distance>30 equipL fire talisman activate L func maskspit() //cultist mask special ?(item.GetCooldown("mask")<=0 ^|item.GetCooldown("mask")>2370) ^&foe.state=33 equipR mask ?time%5=0 activate R //import fishing //import cosmetics/PetBoo import UI/BetterInfo2 import UI/FreeChestTracker //default picks. element = "repeating" weapon = "crossbow" heal = 0 shield = 0 //check if healing is needed ?hp<maxhp heal = 1 : heal = 0 //determine optimal element ?foe=aether&foe.buffs.string!vigor element = "vigor" ?foe=fire&foe.buffs.string!aether element = "aether" ?foe=vigor&foe.buffs.string!poison element = "poison" ?foe=poison&foe.buffs.string!ice element = "ice" ?foe=ice&foe.buffs.string!fire element = "fire" //determine optimal weapon type ?foe.distance<23&foe.distance>20 weapon = "crossbow" :?foe.distance>12 weapon = "wand" :?foe.armor>0 weapon = "hammer" :?foe.count>3 weapon = "big sword" : weapon = "sword" //weapon type overrides ?foe = explosive | foe = insect weapon = "crossbow" ?weapon = "wand" & foe = magic_resist weapon = "crossbow" ?foe = immune_to_physical | foe = magic_vul weapon = "wand" ?foe = immune_to_ranged ?foe.armor>0 weapon = "hammer" :?foe.count>3 weapon = "big sword" : weapon = "sword" //place other manual overrides here equip_weapons() ?weapon = wand | weapon = crossbow ?foe.distance<15 dodge() : ram() pickup_loose() harvesting() steal() fireelem() ooc() blade(10) //bsmash() //hsmash() //maskspit() //poison() //dot //ice ?loc=rocky shield=0 equip_weapons() ?weapon = wand | weapon = crossbow dodge() : ram() pickup() harvesting() steal() fireelem() ooc() blade(10) ?foe=boss bsmash() hsmash() maskspit() ?foe.buffs.string!prot poison() dot() ice() ?loc=valley shield=0 equip_weapons() ?weapon = wand | weapon = crossbow dodge() : ram() pickup() harvesting() steal() fireelem() ooc() blade(10) ?loc=caves shield=0 equip_weapons() ?weapon = wand | weapon = crossbow dodge() : ram() pickup() harvesting() steal() fireelem() ooc() blade(10) ?loc=fungus shield=1 equip_weapons() ?weapon = wand | weapon = crossbow dodge() : ram() pickup() harvesting() steal() fireelem() ooc() blade(10) ?loc=undead shield=0 equip_weapons() ?weapon = wand | weapon = crossbow dodge() : ram() pickup() harvesting() steal() fireelem() ooc() blade(10) ?loc=mine shield=1 equip_weapons() ?weapon = wand | weapon = crossbow dodge() : ram() pickup() harvesting() steal() fireelem() ooc() blade(10) ?loc=ridge shield=1 equip_weapons() ?weapon = wand | weapon = crossbow dodge() : ram() pickup() harvesting() steal() fireelem() ooc() blade(10) ?loc=temple shield=1 equip_weapons() ?weapon = wand | weapon = crossbow dodge() : ram() pickup() harvesting() steal() fireelem() ooc() blade(10) //bosses //rocky ?foe="acronian scout" shield=0 equip_weapons() bsmash() hsmash() maskspit() poison() dot() ice() ?foe=dys shield=0 ram() equip_weapons() bsmash() hsmash() maskspit() poison() dot() ice() //canyon ?foe=wasp equip repeating crossbow ?foe=xylo equip heavy crossbow maskspit() poison() ice() ?foe=poena equip blade ram() //caves ?foe=ceiling equip heavy crossbow maskspit() poison() ice() ?foe=bolesh equip heavy crossbow maskspit() poison() ice() dodge() //shrooms ?foe=snail&foe=boss shield=0 equip_weapon() ?foe=puff equip poison crossbow dodge() ?foe="Angry Shroom"|foe=enoki|foe=morel shield=1 equip_weapons() ram() maskspit() poison() ice() //crypt ?foe=skinless shield=1 equip_weapons() ram() maskspit() poison() ice() ?foe.state=32&foe.time>=45 dodge() ?foe=legless shield=1 equip_weapons() ram() maskspit() poison() ice() //mine ?foe=guardian ?foe.state=2 equip_weapons() ?foe.state=32&foe.time>=30 dodge() ?foe.state!2&foe.state!32 equip_weapons() ram() //ice ?foe=yeti shield=0 ?foe.distance>2&foe.distance<7 equip shovel ?foe.distance>12 weapon=wand : weapon=sword ?foe.state=133 weapon=staff equip_weapons() ?foe.distance>2&foe.distance<7&foe. ^state!133 equip shovel ?foe.distance>7&foe.state!133 ram() maskspit() poison() ice() dot() //temple ?foe=nagaraja shield=0 ?debuffs.count<40 equip_weapons() maskspit() poison() ice() dot() ?foe.state=112&foe.time=45 dodge()

It's still a bit buggy, for I don't really wanna continue debugging today. Will return to this at some other date.
Last edited by Yuan; Nov 5, 2023 @ 9:35am
Mharr Nov 5, 2023 @ 4:40am 
Seriously what is that first line?
Yuan Nov 5, 2023 @ 9:34am 
It will make your face look like that in Bighead mode.
Last edited by Yuan; Nov 5, 2023 @ 9:37am
Isn't the bighead mode already a thing using mind Stone?
zukakog Nov 29, 2023 @ 12:11pm 
Originally posted by No Mic / 50/50 WiFi / English:
Isn't the bighead mode already a thing using mind Stone?
If you have big head turned on, you can customize the face, as the OP has done with that first line of code.
Mharr Nov 30, 2023 @ 6:09am 
So how does the syntax for custom faces work? The individual example is unparseable and genuinely looks like something pasted in accidentally that would break a compiler / interpreter.
zukakog Nov 30, 2023 @ 7:06am 
Ignore the ">" and "(". What's left is two eyes and a mouth. I guess that would mean ">" means print and "(" means the location is 'after the left cheek, wherever that is at the moment'.
ZigZagZouave Feb 2, 2024 @ 9:09am 
You can make your scripts more efficient by using "else if" for locations and foe types. Instead of checking for all locations 30 times a second.
Ex.
?loc = rocky *Do stuff* :?loc = valley *Do stuff* :?loc = caves *Do stuff*
This way it stops checking subsequent possible locations or foes once its found the correct ones.
Last edited by ZigZagZouave; Feb 2, 2024 @ 9:10am
mvmeersbergen Jun 24, 2024 @ 5:36am 
To give something back to the community; I've improved the code for the debug output to use less screen real estate:

var outBuf = [[]] outBuf = [ ["buffs", buffs.string], ["debuffs", debuffs.string], ["foe buffs", foe.buffs.string], ["foe debuffs", foe.debuffs.string] ] var outIdx outIdx= 1 for i = 0 outBuf.Count() - 1 var outval outval outBuf [1]
?!string.Equals(outVal,"")
var outKey
outkey outBuf[0]
>^0,@outIdx@,@outKey@=@outVal@
outIdx++
[/code]

You can use referral code RRHV if you liked it. Thanks. 🙏
Last edited by mvmeersbergen; Jun 24, 2024 @ 5:40am
Piploop Dec 1, 2024 @ 5:31pm 
This goes absolutely crazy and does the most random stuff for me 😅
< >
Showing 1-15 of 15 comments
Per page: 1530 50