kaansoral / adventureland Goto Github PK
View Code? Open in Web Editor NEWAdventure Land The Open Source CODE MMORPG
License: Other
Adventure Land The Open Source CODE MMORPG
License: Other
https://adventure.land redirects to http version. Please enable https for secure login.
this is lame... no matter what I change in my atleast one of my scripts now, it always seems to kick me from the game.. I can't play anymore because of it right now.. :(
this is my current iteration of the script.. -- https://github.com/JourneyOver/Adventure_Land_Codes/blob/Test_branch/Basic%20Grinding.js i've tried changing the delay several times over and nothing works.. (btw this code does kiting so it kinda needs to be fast...) (i've tried setting it to 1000 / 4 --- 2000 / 4 and even 10000 / 4 ) and it's always kicking me, but like I said before it needs to be fast so I can't really do something like 10000 / 4 ....
in all honestly I really hope you either revert the 100 calls thing or raise it some :/
This would take items as two arguments, each an item in the format { name: itemName, level: int }
,
and would compare the stats on a LVL 0 character, with no gear. It would, however, take into consideration the character's class.
My question is, would this be a candidate for addition to runner_functions or should it be added to /examples
?
This function would be akin to smart_move
in that it's not optimal but gets the job done.
Having worked with the map editor on the new BEEginner Dungeon map here is a list of improvements I'd like to have made for the map editor.
Well "target of target" is already being discussed here -- #13 so I won't push that anymore since you plan on doing it from the looks of it.
but is there anyway to get the range of a monster (talking about how far away it can attack you, not how far away it is exactly) currently have tried json method to getting it and sadly it doesn't seem to show any signs on how to get it exactly, so either its not documented anywhere or it's not in the game at the moment. which if it's not in the game at the moment, would love to see it get added :D
When a player gets to level 60 (just an idea) they should be able to talk through global chat, where everyone on the server can hear them. This would make the game more social I think, and building a community is important for player retention
Local chat would be just the screen you're on (this is how it works now)
Party chat would be everyone in your party
Don't let us inundate you with requests. These things can be put on the backburner for a long time
What's the link to your Slack?
Thanks for making an awesome game. I will donate for some new art content as soon as I can afford it
https://finalbossblues.itch.io/time-fantasy-winter
Do you already have these packs?
https://finalbossblues.itch.io/tf-rpg-charactersprites-1 Says it includes some character animations
https://finalbossblues.itch.io/fantasy-rpg-tileset-pack
https://finalbossblues.itch.io/time-fantasy-monsters
Currently I have a program set up where it identifies all "friends" aka my characters. One is considered the leader, and the remainders fall in line behind the leader. The end goal is for them to all attack the leaders target. How would I go about getting the target of the leader player?
I've looked all over the place, can't find any function to move items around in your inventory.
It's probably in html.js, but I'm requesting that a method be added to move around items.
This one's fairly self-explanatory, I didn't think much of it until just recently. I've noticed I've just been... getting the occasional leather here and there from the arctic bees. Is this because it's a global drop?
This is currently an un-documented socket emit, I think this should be a runner function or two.
This comes up often enough (and I admit i've looked for it myself) that it should be implemented.
As we progressively get into more and more advanced code, our files are getting larger as well.
Filled with auxiliary functions and variables, it's starting to become a pain to navigate our own code due to how long it is!
I suggest having some kind of code organisation, perhaps the CODE page could have tabs that we can name to organise our code?
Inspired by Shenzhen IO and their "manual".
Spoiler alert if you care about Shenzhen IO
A little introduction about Shenzhen IO first if you didn't know - It's a RISC Assembly Programming game.
It comes bundled with its own instruction manual in which players will refer to, to learn the language and play the game.
However, there's undocumented code that's revealed upon finishing a certain amount of levels.
Why not use that concept and hide undocumented instructions/code inside the game world, which encourages exploration?
Maybe exposes a bit more of the game logic, explaining for example - what parent.next_pot() does, increasing the arsenal of code for players and enabling them to do more elaborate functions.
That way we can also reduce the learning curve by limiting the available variables.
function game_log_rainbow(message) {
var rainbow_colors = ["#FF0000", "#FF7F00", "#FFFF00", "#00FF00", "#0000FF", "#4B0082", "#8B00FF"];
var formatted_message = "";
for (var i = 0; i < message.length; i++) {
var color = rainbow_colors[i % rainbow_colors.length];
formatted_message += `<span style="color:${color}">${message.charAt(i)}</span>`;
}
game_log(formatted_message);
}
Example Usage:
game_log_rainbow("// DeviousName, Warrior");
It's been very difficult adjusting my code so that the calls per second don't exceed 33. I don't really know what part of the code is causing all of these calls, or even really what a "call" is. Having a fps-like counter somewhere would be a great help.
Currently, when a player opens an exchangeable, the return object on the exchange function does not return useful information in the following two cases:
starting with the exchange
function
//Source code of: exchange
async function exchange(item_num)
{
parent.e_item=item_num;
var call=await parent.exchange(1),num=undefined,name=undefined;
if(!call.in_progress) return call;
if(character.q.exchange) num=character.q.exchange.num;
while(character.q.exchange || character.items[num] && character.items[num].name=="placeholder")
await sleep(1);
if(character.items[num]) name=character.items[num].name;
else num=undefined;
return {success:true,reward:name,num:num};
}
This code function executes parent.exchange
, which I believe is located in js/functions.js line 3122. Then, the exchange function awaits the exchange animation via await sleep(1)
calls while q.exchange
is in progress.
When the exchange is finished, the function checks what item ended up in the q.exchange.num
slot and returns the name (reward) and inventory slot (num) of the reward
This is where the crux of the problem lies. For items that don't stay in the slot the exchange placeholder item sat in, the return object is basically empty
When opening an exchangeable, the return object only populates reward
and num
if the resulting item is an actual item. Currency rewards (gold, shells) result in the returned object having an undefined reward
and num
property
The following objects were generated with the code (executed in the in-game snippet runner),
exchange(ITEM_INDEX).then( (s) => console.log(s) )
^ A functioning example: Raw Emerald that contained a Weapon Box. reward isweaponbox
because the emerald resulted in a weaponbox, and num
is 26, because that's the slot the item ended up in.
^ A broken example: Green Envelope that contained 50,000 gold
Looking back to the exchange
function, reward
gets set to name
if & only if character.items[num]
is not falsey. num
in this context is the character.q.exchange.num
, which is the inventory index of the placeholder item during the exchange. In most cases, this placeholder item index is also the slot the rewarded item ends up in. However, once exchanges finish that reward a currency, the currency doesn't remain as an item in your inventory. Because it doesn't stick around in your inventory, character.items[num]
goes back to being falsey, which keeps reward
undefined and resets num
to undefined
In another example, the return object also breaks when you receive a stackable item for which you already have a non-full stack of.
The exchange's placheolder item sits in a non-empty slot in the character's inventory. If the reward is a stackable item, the item joins an existing non-full stack. This leads to another empty return object, since the reward does not end up in the inventory slot that the placeholder item was in.
When opening a Green Envelope and receiving a Firecracker while there are no other firecrackers in my inventory, the following object is returned
However, with that firecracker still in my inventory, receiving another returns an empty object.
I don't know how to fix this, otherwise I would've opened a PR with the fix.
I bought game and played it mostly on steam client, and some of my code choices are steam client specific (loading source code from local folder, etc). But as it seems now there is no easy way to play from steam client on self-hosted server.
It would be nice to have that option.
If someone would come up with some kind of workaround it would be great too! (I play on windows 10 machine).
Do we have these features in runner_functions.js?
Could we get more documentation on what each character has as a special ability?
Possibly in the future an icon on your skillbar that shows the cooldown?
Fixed: I noticed since yesterday if I am alt tabbed and come back there's no longer a million enemies on the same screen. Good work!
Bug: If I stay on one screen for a long time, (hours) then move over to the next screen, there's a bunch of enemies there which are already dead. If I target them it says "Goo X"
They are still being targeted even though I am checking if ( !parent.entities[id].dead && parent.entities[id].hp > 0 )
When an enemy dies, is it being broadcast to the whole map? If not then maybe increase the broadcast distance
I keep getting this error: "Disconnected Reason: You've made 100 calls in 3 seconds. That's too much."
What constitutes a call? I keep getting this error despite how I try to change my code.
Is this limit shared between characters on the account?
Hello!
I want to set the level limit of the upgrade function, can you please give us the additional code to make it happen?
Thanks,
Adventurer :)
He has changed his github username.
https://fansana.github.io/adventureland/index.html
should be
https://nexusnull.github.io/adventureland/index.html
The add_chat function (which takes a name and message, correct?) only seems to add chat for the player, not for nearby players. It's possible this is intended, but it might not be. Or I'm doing it wrong, that's a possibility.
parent.add_chat(character.name, "hi");
You could spoof chat of other characters if you gave us access to this though, but a version that would let you do this only using your own name would be nice.
Is there a way to code to have the game immediately town if my hp gets to low? As if i afk and use up all my potions?
Alright I can't figure out how to set potions to be used at 50% health.
Would it be possible to document the array values contained in G.geometry? e.g. x_lines
, y_lines
, groups
, etc? I don't have a good sense for that these are - thanks!
The Apothecary NPC would have several features relating to potions.
I'm sure this will be fixed in a few minutes, but I wanted to bring it to your attention so that you know an error exists upon restarting where (I assume) it thinks you're still connected.
It'd be nice to be able to resize the chat window, change the font size, and/or retaining focus on the chat window after submitting a message.
Considering a coding game would warrant quite a bit of discussion of code in-game, maybe formatting styles as well in game?
So while farming in Halloween i noticed a party of 2 players next to me, obviously dual boxing. Guy had a healbot. Even with just another character it seems way way to good for multiboxers in a game where you can have an automatic healbot and automatic farming. If i had a healbot i would be way ahead of where i am now, taking on much harder mobs for better loot/xp. Unless something is done quick anyone who multiboxes will easily get way ahead of anyone else. TO be honest i don't want to play a game that will get dominated by them, and i know most people wouldn't want to either. Im saying this now because reactive instead of proactive changes are going to be much MUCH less effective, especially as time goes on. I really think multiboxing needs to be banned for this game to have much of any future.
I myself after one day of playing this game have amassed roughly 11-13m gold, decent gear, got to level 44, and have gotten 25+ candies/rare candies. I will level much slower, use more gold, and have worse gear compared to any multiboxer even if its only dual. A healbot looks like it requires minimal funding, just some decent + int gear and a lot of MP potions which are easily fund-able.
When you walk sideways you look like so:
As you can see, no red hood visible on that sprite, but when you turn your back, you see red hood:
Which is inconsistent with side view and also looks scuffed.
Possible solution would be:
Add to the CX jar effect giving not only hat, but also "back", which contains hair continuation as on side parts.
(Im not pixel artists, just as rough example):
When pressing N to view player names, overlapping/close by players have their plates overlap, making us unable to see where a specific player is, maybe shift nameplate focus where our mouse is focused on?
Can we get a callback function similar to on_party_invite() but for requests as well? (ie, when someone is already in a party, and you "request" them to join their party, a function such as on_party_invite() should be fired)
Okay so it seems you can get the target of another target. IM confused of how to do this, but logically seems we need to get the target of the target, and then if it is not the player it will look for another creature.
Hello everyone, thus far im doing alright in this game, but I was wondering if i could AFK efficiently in the pvp server.
The point is, can I make myself target a player that atacked me instantly/after killing the mob I was on?
What functions besides "get_player(name)" exist for targetting players?
Thank you
The ability to walk away from the monster I'm attacking while still attacking Its mostly important for ranged characters as without the use of range you have a lot greater chance of dying while afk then melee
Just dont know how I would go about writing this code for a general use on any character
Currently there are no ways of splitting a stack, for example a stack of potions or candies.
I just wanted to combine my accessories once and I have to take out my entire stack of 116 :(
Hey Adventurers!
Like the header states, could we get a party invitation and accept code, ideally upon login. Seems a bit tricky though!
How about an added argument that will allow players to target a monster based on its name / mtype and call it like 'monster_name' or something.
Like making it an alternative if min_xp and max_att aren't set.
ex.
get_nearest_monster(
{
monster_name : "squigtoad" , // this one
no_target : true ,
path_check : true
});
or like an array of monsters or something like this
get_nearest_monster(
{
monster_name : ["squigtoad","bee"] , // this one
no_target : true ,
path_check : true
});
I know we can just make one on our own, but hey. :)
parent.stop_character_runner(character.name);
Does not "disengage" the running script.
UPD1: clearInterval(this);
does not work.
UPD2: const loop = setInterval( function(){ clearInterval(loop);
stops the loop but interface says the runner is still going.
UPD3: if I execute use_skill("toggle_run_code")
as a snippet, it starts the runner but does not stop, says: "skill not found".
how can i auto heal a specific player or a party member using heal();?
This is a WIP issue where I intend to fletch out a beginner level dungeon with bees as the theme, current writing on mobile, so my editing is limited :p
The development of the bee dungeon is happening in the following branch on my personal fork
main...thmsndk:adventureland:feature/bee_dungeon it contains a few things about devcontainers it should not contain, so once it is ready / in a release candidate state. I'll make a PR from a more clean branch :)
parent.entities
to keep it simple for new playershoney_bee_nest tileset by thmsn
Worker Bees, Drone Bees
Queen
Should spawned minions target the same player, or be spread over more players?
Should Worker bees be spawned at the same spawn point or spread over each spawn point?
You can craft a key to enter the dungeon.
Recipe is subject to change but should consist of basic mob drops.
N x bee wings + N x slime core + more?
Spawns minion bees at an interval.
The minions could be random or spawned in specific pairs
Upon killing the queen a reward is granted.
Should killing minion bees give / drop anything?
What rewards should be dropped from Queen? What about xp and gold?
TODO describe the new honey items
names,stats and everything is WIP and might change
Snippet to explore existing gear by type
console.dir(
Object.entries(G.items).reduce((acc, [itemName, item]) => {
acc[item.type] = acc[item.type] || {};
acc[item.type][itemName] = Object.fromEntries(
Object.entries(item).sort(([a], [b]) => a.localeCompare(b))
);
return acc;
}, {}),
{ depth: null }
);
id | name | type | note |
---|---|---|---|
honeykey | - | key | |
honey | - | material | |
propolis | - | material | |
wax | - | material |
id | name | type | note |
---|---|---|---|
honeyelixir | - | elixir | a/r piercing + sugarrush |
honeypot | - | pot | heals both mp & hp, craftable, drops |
What is extra_stat?
id | name | type | note |
---|---|---|---|
honeybelt | - | belt | A stats belt that gives less stat than a dedicated stat belt? gives stats based on class? stats belts gives 4 stat and 3 on compund |
honeycape | - | cape | should be worse than cape? there is no early game cape. cape gives 10 armor, 8 resist, 4 stat base, upgrade = 0.1 stat, 2 armor, 1 resist |
honeyorb | - | orb | stat orb? 4, upgrade 3, + ability? |
honeyhelmet | - | helmet | worse than heavy, better than basic? 5-25 armor, 6-28 resistance, 1-3 stat. upgrade 1 stat, 0.5-5.5 armor, 0.5-5.5 resist |
honeychest | - | chest | 8-42 armor 6-28 resistance 1-3 stat, upgrade 1 stat, 0.5-5.5 armor / resistance |
honeypants | - | pants | 7-35 armor, 4-21 resistance, 1-3 stat, upgrade same as chest |
honeyboots | - | shoes | 3-14 armor 1-3 stat 5-7 speed, upgrade 1 stat, 0.5 - 5.5. armor, 0.625 - 1.125 speed, 0-2.75 resistance |
honeygloves | - | gloves | 6-28 armor 6-28 armor 3-14 resistance 1-3 stat, upgrade same as chest |
honeyearring | - | earring | stat earrings, like belt? |
honeyering | - | ring | stat rings? like belt? gives 2 stat, compound 2 |
honeycomb | - | shield | slows attacker? can we debuff, like dreturn? |
honeyamulet | - | amulet | hmm? aura? gold? |
Offhand for mages?
Quiver for rangers? (honey jar with arrows in it?)
Weapons?
Honey/propolis/wax coated stinger?
const achievementsByStatAndKills = Object.entries(G.monsters)
.flatMap(([monsterKey, monster]) =>
(monster.achievements || []).map(([kills, type, stat, amount]) => ({
monsterKey,
kills,
type,
stat,
amount,
}))
)
.reduce((acc, achievement) => {
acc[achievement.stat] = acc[achievement.stat] || {};
acc[achievement.stat][achievement.kills] = acc[achievement.stat][achievement.kills] || {};
acc[achievement.stat][achievement.kills][achievement.monsterKey] = (acc[achievement.stat]?.[achievement.kills]?.[achievement.monsterKey] || 0) + achievement.amount;
return acc;
}, {});
console.dir(achievementsByStatAndKills);
"achievements":[
[1,"stat","hp",5],
[5,"stat","mp",5],
[10,"stat","xp",1],
[50,"stat","armor",5],
[1000,"stat","gold",1],
[2500,"stat","crit",0.25],
# [10000,"stat","attack",2],
# [100000,"stat","apiercing",2],
# [1000000,"stat","attack",3],
# [10000000,"stat","xp",1],
]
"achievements":[
[25,"stat","hp",5],
[50,"stat","mp",5],
[1000,"stat","gold",0.5],
]
"achievements":[
[25,"stat","hp",5],
[50,"stat","mp",5],
[1000,"stat","gold",0.5],
]
We need to determine what the dungeon should teach the new players.
I'd like to teach them to use keys, keys could be craftable from bee drops, so you are not afraid to use them like I was first time I got a crypt key
What mechanics should there be? Should it be combat focused?
Perhaps multiple modes, either 1 chosen at random or multiple phases?
The modes could also be different tiers of the dungeon that you either unlock or get a new key to upon completion
-Should cutebees spawn in this dungeon?
should bee kills in this dungeon count towards the server spawning a cute bee?
Link to discord issue for real-time discussion
https://discord.com/channels/238332476743745536/1176224676809293844/1176224676809293844
Currently we have two ideas
A Hive that spawns bees, this is a swaming mechanic, and you will probably die in the long run if you don't kill the hive.
Upon killing the Hive Phase 2 starts
perhaps you get a reward / drop for killing the Hive
A Queen Bee emerges from the hive or perhaps you can enter the "Queen Room"
Bee Soldier spawns - perhaps you have to kill the soldiers before you can damage the queen, with a larger window than crabx
Defeating the queen bee gives drops. This should be the real reward for completing the dungeon
More phases?
Axioms notes
https://discord.com/channels/238332476743745536/259894563047473172/1017907139865485382
There is also a thread I'll try and go trough it and copy notes.
https://carolinahoneybees.com/bees-in-a-hive/
https://www.woah.org/en/disease/diseases-of-bees/
https://extension.uga.edu/publications/detail.html?number=B1045&title=honey-bees-and-beekeeping
https://carolinahoneybees.com/bee-anatomy-parts-of-a-bee/
http://www.usfarad.org/honey-bee-biology-basics.html
Currently refreshing the browser sets your code to default.
Not sure if unintended, but it would be nice to have code auto save every few minutes. Maybe have save slots especially for code?
Currently you can configure your bot token in variables.js
but the webhooks / channels it goes to are hardcoded to the adventureland discord.
general messages seems to go to #game_events
and if the message contains joined Adventure Land
it will go to #new_players
At the very minimum you should be able to specify the general events channel, and the new player channel in variables.js or something equivalent.
adventureland/node/server_functions.js
Lines 3263 to 3287 in 887a3e8
function searchInv(name)
{
for(var i = 0; i <= 41; i++)
if(character.items[i].name == name){
return i;
}
}
the problem I found was when character.items[] == null the function broke, I think the solution is to set that null as undefined
Before introducing other linters like eslint
we should get the formatting in order.
As reasoning I'd like to quote prettier:
What is Prettier?
- An opinionated code formatter
- Has few options
Why?
- No need to discuss style in code review
- Saves you time and energy
For the options part I'd like it if @kaansoral decides the way his projects should look like:
I think I may have found a bug!
setInterval(function(){
const now = Date.now()
set_message(`NOW: ${now}`)
},1000);
Will print
Now:
But changing set_message
to remove the space
set_message(`NOW:${now}`)
Prints as expected.
Known issue?
As I'm neither in the US or UK, at times I have ping issues.
However, in "pro" mode, ping only works once instead of a continual ping which would be far more useful than a single ping.
Or you can just do the default of windows ping, a 4 packet ping and returns an average.
My internet is quite dodgy :(
Or you can just send us the server IP and let us ping it ourselves (Probably a bad idea)
When you die in the arena, your X coordinates are set to either null
or "main"
, which results in you receiving a movement penalty on attempting to move, resulting in yet another death, which continues the loop. The only way I've found to exit the loop is use_skill("use_town")
.
This seems to be prevalent across servers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.