mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:27 -05:00
Merge branch 'main' into Content-Patch-1
This commit is contained in:
@@ -114,10 +114,11 @@ if is_production:
|
||||
#maps["desertland"]["key"]="jayson_desertland_copy"
|
||||
pass
|
||||
|
||||
game_version=806
|
||||
game_version=808
|
||||
SALES=4+5+388+5101+125/20 #donation+manual+macos+steam+sales
|
||||
update_notes=[
|
||||
"Last Update [16th of January]",
|
||||
"Valentine's Day Event",
|
||||
"Last Update [3rd of Fabruary]",
|
||||
]
|
||||
ip_to_subdomain={ #IMPORTANT: SPECIAL PAGE RULES ARE NEEDED: https://dash.cloudflare.com/b6f5a13bded5fdd273e4a1cd3777162d/adventure.land/page-rules - uss1 / eus1 was best
|
||||
"35.187.255.184":"asia1",
|
||||
|
||||
+9
-9
@@ -17,7 +17,7 @@ drops={
|
||||
],
|
||||
"global":[
|
||||
#[0.000015,"goldenegg"], #originally 0.000005
|
||||
#[0.000001,"5bucks"],
|
||||
[0.0000001,"5bucks"],
|
||||
#[0.0002,"gift0"],
|
||||
#[0.004,"gift1"],
|
||||
#[0.0004,"redenvelope"],
|
||||
@@ -27,7 +27,7 @@ drops={
|
||||
#[0.0001,"redenvelopev3"],
|
||||
#[0.00005,"greenenvelope"],
|
||||
#[0.0001,"redenvelopev4"],
|
||||
#[0.001,"candypop"],
|
||||
[0.001,"candypop"],
|
||||
],
|
||||
"main":[
|
||||
[0.0007,"ringsj"],
|
||||
@@ -580,19 +580,19 @@ drops={
|
||||
],
|
||||
"statamulet":[
|
||||
[1,"intamulet"],
|
||||
[1.2,"stramulet"],
|
||||
[1,"stramulet"],
|
||||
[1,"dexamulet"],
|
||||
],
|
||||
"statbelt":[
|
||||
[1,"intbelt"],
|
||||
[1.05,"strbelt"],
|
||||
[1,"strbelt"],
|
||||
[1,"dexbelt"],
|
||||
],
|
||||
"statring":[
|
||||
[1,"intring"],
|
||||
[1,"vitring"],
|
||||
[1,"dexring"],
|
||||
[1.2,"strring"],
|
||||
[1,"strring"],
|
||||
],
|
||||
"basicelixir":[
|
||||
[1,"elixirvit0"],
|
||||
@@ -778,6 +778,7 @@ drops={
|
||||
[0.3,"lmace",None,None,"lucky"],
|
||||
[1,"oxhelmet",None,None,"lucky"],
|
||||
[0.1,"cdragon",None,None,"lucky"],
|
||||
[0.1,"snakeoil"], #2025
|
||||
],
|
||||
"eastereggs":[
|
||||
[1,"egg0"],
|
||||
@@ -915,7 +916,6 @@ drops={
|
||||
[1,"cupid"],
|
||||
],
|
||||
"candy0":[
|
||||
[1,"pmaceofthedead"],
|
||||
[0.008,"spookyamulet"],
|
||||
[1,"gold",480000],
|
||||
[0.0005,"cxjar",1,"hat410"],
|
||||
@@ -1031,10 +1031,10 @@ drops={
|
||||
[0.5,"empty"],
|
||||
],
|
||||
"weaponofthedead":[
|
||||
[0.85,"bowofthedead"],
|
||||
[0.35,"swordofthedead"],
|
||||
[1,"bowofthedead"],
|
||||
[1,"swordofthedead"],
|
||||
[1,"maceofthedead"],
|
||||
[0.1,"pmaceofthedead"],
|
||||
[1,"pmaceofthedead"],
|
||||
[1,"staffofthedead"],
|
||||
[1,"daggerofthedead"],
|
||||
],
|
||||
|
||||
+6
-6
@@ -198,7 +198,7 @@ armor={
|
||||
"set":"fury",
|
||||
"tier":1.5,
|
||||
"type":"helmet",
|
||||
"class":["rogue","warrior"],
|
||||
"class":["rogue","warrior","ranger","paladin"],
|
||||
"skin":"fury",
|
||||
"scroll":True,
|
||||
#"evasion":1,
|
||||
@@ -2049,7 +2049,7 @@ accessories={
|
||||
"skin":"mearring",
|
||||
"luck":8,
|
||||
"compound":{
|
||||
"luck":1,
|
||||
"luck":4,
|
||||
},
|
||||
"name":"Mistletoe Earring",
|
||||
"g":12000000,
|
||||
@@ -2244,7 +2244,7 @@ accessories={
|
||||
"skin":"stramulet",
|
||||
"str":4,
|
||||
"compound":{
|
||||
"str":2,
|
||||
"str":3,
|
||||
},
|
||||
"name":"Amulet of Strength",
|
||||
"g":30000,
|
||||
@@ -2262,7 +2262,7 @@ accessories={
|
||||
"t2stramulet":{
|
||||
"type":"amulet",
|
||||
"skin":"t2stramulet",
|
||||
"str":5,
|
||||
"str":6,
|
||||
"resistance":30,
|
||||
"compound":{
|
||||
"str":3,
|
||||
@@ -2276,10 +2276,10 @@ accessories={
|
||||
"t2intamulet":{
|
||||
"type":"amulet",
|
||||
"skin":"t2intamulet",
|
||||
"int":5,
|
||||
"int":6,
|
||||
"armor":30,
|
||||
"compound":{
|
||||
"int":2,
|
||||
"int":3,
|
||||
"armor":20,
|
||||
},
|
||||
"name":"Amulet of the Fierce Mage",
|
||||
|
||||
+2
-1
@@ -464,7 +464,7 @@ maps={
|
||||
#"key":"jayson_ALMap2_v2.Xmas",
|
||||
#"key":"jayson_ALMap2_v2.CNewYear",
|
||||
#"key":"jayson_ALMap2_v2_xmas", #xmas
|
||||
#"key":"jayson_ALMap2_v2.lunarNewYear",
|
||||
"key":"jayson_ALMap2_v2.lunarNewYear",
|
||||
"name":"Mainland",
|
||||
"npcs":[
|
||||
#{"id":"newupgrade","position":[-203,-174]},
|
||||
@@ -1143,6 +1143,7 @@ maps={
|
||||
"npcs":[
|
||||
{"id":"transporter","position":[-14,-477]},
|
||||
{"id":"locksmith","position":[316,-270]},
|
||||
{"id":"scrollsmith","position":[606,-1590]},
|
||||
],
|
||||
"monsters":[
|
||||
{"type":"plantoid","boundary":[-1013,-472,-575,-130],"count":4,"grow":True}, #added grow 31/1/2024
|
||||
|
||||
+61
-61
@@ -82,13 +82,13 @@ monsters={
|
||||
"name":"Froggie","speed":10,"hp":600,"xp":7200,"attack":24,"damage_type":"physical","respawn":960,"gold":300,"range":15,"frequency":0.5,"aggro":0,"evasion":99,
|
||||
"difficulty":12,
|
||||
"achievements":[
|
||||
[10,"stat","mp",10],
|
||||
[100,"stat","vit",1],
|
||||
[1000,"stat","int",1],
|
||||
[10000,"stat","evasion",0.5],
|
||||
[100000,"stat","int",3],
|
||||
[1000000,"stat","vit",4],
|
||||
[10000000,"stat","evasion",1],
|
||||
[1,"stat","mp",10],
|
||||
[10,"stat","vit",1],
|
||||
[100,"stat","int",1],
|
||||
[1000,"stat","evasion",0.5],
|
||||
[10000,"stat","int",3],
|
||||
[100000,"stat","vit",4],
|
||||
[1000000,"stat","evasion",1],
|
||||
]
|
||||
},
|
||||
"rat":{
|
||||
@@ -267,7 +267,7 @@ monsters={
|
||||
[10000,"stat","int",1],
|
||||
[100000,"stat","dex",1],
|
||||
[1000000,"stat","vit",2],
|
||||
[10000000,"stat","attack",20], #follow scorpion pattern 16/9/24
|
||||
[10000000,"stat","attack",10],
|
||||
]
|
||||
},
|
||||
"xscorpion":{
|
||||
@@ -356,12 +356,12 @@ monsters={
|
||||
"rbuff":"mlifesteal",
|
||||
"achievements":[
|
||||
[1,"stat","hp",10],
|
||||
[100,"stat","mp",20],
|
||||
[1000,"stat","attack",5],
|
||||
[10000,"stat","for",1],
|
||||
[100000,"stat","xp",2.5],
|
||||
[1000000,"stat","lifesteal",1],
|
||||
[10000000,"stat","lifesteal",2.5],
|
||||
[10,"stat","mp",20],
|
||||
[100,"stat","attack",5],
|
||||
[1000,"stat","for",1],
|
||||
[10000,"stat","xp",2.5],
|
||||
[100000,"stat","lifesteal",1],
|
||||
[1000000,"stat","lifesteal",2.5],
|
||||
]
|
||||
},
|
||||
"minimush":{
|
||||
@@ -425,12 +425,12 @@ monsters={
|
||||
"rbuff":"mlifesteal",
|
||||
"achievements":[
|
||||
[1,"stat","hp",10],
|
||||
[100,"stat","mp",20],
|
||||
[1000,"stat","attack",5],
|
||||
[10,"stat","mp",20],
|
||||
[100,"stat","attack",5],
|
||||
[1000,"stat","resistance",5],
|
||||
[10000,"stat","resistance",5],
|
||||
[100000,"stat","resistance",5],
|
||||
[1000000,"stat","lifesteal",1],
|
||||
[10000000,"stat","lifesteal",2.5],
|
||||
[100000,"stat","lifesteal",1],
|
||||
[1000000,"stat","lifesteal",2.5],
|
||||
]
|
||||
},
|
||||
"phoenix":{
|
||||
@@ -440,12 +440,12 @@ monsters={
|
||||
"cooperative":True,
|
||||
"achievements":[
|
||||
[1,"stat","hp",10],
|
||||
[100,"stat","hp",20],
|
||||
[1000,"stat","vit",1],
|
||||
[10000,"stat","int",1],
|
||||
[100000,"stat","resistance",5],
|
||||
[1000000,"stat","resistance",10],
|
||||
[10000000,"stat","frequency",1],
|
||||
[10,"stat","hp",20],
|
||||
[100,"stat","vit",1],
|
||||
[1000,"stat","int",1],
|
||||
[10000,"stat","resistance",5],
|
||||
[100000,"stat","resistance",10],
|
||||
[1000000,"stat","frequency",1],
|
||||
]
|
||||
},
|
||||
"cgoo":{
|
||||
@@ -493,12 +493,12 @@ monsters={
|
||||
"slots":{"mainhand":{"name":"scythe","level":8}},
|
||||
"achievements":[
|
||||
[1,"stat","for",1],
|
||||
[100,"stat","vit",1],
|
||||
[1000,"stat","for",2],
|
||||
[10000,"stat","vit",3],
|
||||
[100000,"stat","crit",0.25],
|
||||
[1000000,"stat","for",10],
|
||||
[10000000,"stat","for",20],
|
||||
[10,"stat","vit",1],
|
||||
[100,"stat","for",2],
|
||||
[1000,"stat","vit",3],
|
||||
[10000,"stat","crit",0.25],
|
||||
[100000,"stat","for",10],
|
||||
[1000000,"stat","for",20],
|
||||
]
|
||||
},
|
||||
"ligerx":{
|
||||
@@ -539,12 +539,12 @@ monsters={
|
||||
"name":"Stompy","speed":40,"charge":80,"hp":640000,"xp":600000,"attack":3600,"damage_type":"physical","respawn":36*60,"gold":80000,"range":64,"frequency":0.8,"aggro":0.2,
|
||||
"achievements":[
|
||||
[1,"stat","hp",50],
|
||||
[100,"stat","mp",20],
|
||||
[1000,"stat","speed",0.25],
|
||||
[10000,"stat","range",0.5],
|
||||
[100000,"stat","mp",50],
|
||||
[1000000,"stat","frequency",1],
|
||||
[10000000,"stat","attack",200],
|
||||
[10,"stat","mp",20],
|
||||
[100,"stat","speed",0.25],
|
||||
[1000,"stat","range",0.5],
|
||||
[5000,"stat","mp",50],
|
||||
[20000,"stat","frequency",1],
|
||||
[50000,"stat","attack",20],
|
||||
]
|
||||
},
|
||||
"arcticbee":{
|
||||
@@ -761,8 +761,8 @@ monsters={
|
||||
[100,"stat","vit",1],
|
||||
[1000,"stat","dex",1],
|
||||
[10000,"stat","armor",10],
|
||||
[100000,"stat","rpiercing",10],
|
||||
[1000000,"stat","manasteal",0.32],
|
||||
[50000,"stat","rpiercing",10],
|
||||
[100000,"stat","manasteal",0.32],
|
||||
]
|
||||
},
|
||||
"slenderman":{
|
||||
@@ -793,8 +793,8 @@ monsters={
|
||||
[100,"stat","vit",1],
|
||||
[1000,"stat","str",1],
|
||||
[10000,"stat","resistance",10],
|
||||
[100000,"stat","apiercing",10],
|
||||
[1000000,"stat","crit",1],
|
||||
[50000,"stat","apiercing",10],
|
||||
[100000,"stat","crit",1],
|
||||
]
|
||||
},
|
||||
"greenjr":{
|
||||
@@ -808,9 +808,9 @@ monsters={
|
||||
[10,"stat","vit",1],
|
||||
[100,"stat","armor",10],
|
||||
[1000,"stat","resistance",15],
|
||||
[10000,"stat","for",3],
|
||||
[100000,"stat","frequency",1],
|
||||
[1000000,"stat","speed",1],
|
||||
[5000,"stat","for",3],
|
||||
[20000,"stat","frequency",1],
|
||||
[50000,"stat","speed",1],
|
||||
]
|
||||
},
|
||||
"jr":{
|
||||
@@ -824,9 +824,9 @@ monsters={
|
||||
[10,"stat","vit",1],
|
||||
[100,"stat","resistance",10],
|
||||
[1000,"stat","armor",8],
|
||||
[10000,"stat","attack",20],
|
||||
[100000,"stat","luck",1],
|
||||
[1000000,"stat","speed",1],
|
||||
[5000,"stat","attack",20],
|
||||
[20000,"stat","luck",1],
|
||||
[50000,"stat","speed",1],
|
||||
]
|
||||
},
|
||||
|
||||
@@ -867,15 +867,15 @@ monsters={
|
||||
},
|
||||
"achievements":[
|
||||
[1,"stat","hp",10],
|
||||
[100,"stat","hp",30],
|
||||
[1000,"stat","vit",1],
|
||||
[10000,"stat","for",3],
|
||||
[100000,"stat","resistance",10],
|
||||
[1000000,"stat","attack",25],
|
||||
[10000000,"stat","speed",2],
|
||||
[10,"stat","hp",30],
|
||||
[100,"stat","vit",1],
|
||||
[1000,"stat","for",3],
|
||||
[10000,"stat","resistance",10],
|
||||
[100000,"stat","attack",25],
|
||||
[1000000,"stat","speed",2],
|
||||
]
|
||||
},
|
||||
"sparkbot":{
|
||||
"sparkbot":{
|
||||
"name":"Spark Bot","speed":20,"charge":75,"hp":325000,"xp":400000,"attack":754,"damage_type":"magical","respawn":6,"gold":1,"range":185,"frequency":1.56,"aggro":0.1,"reflection":8,"armor":140,"resistance":160,
|
||||
"achievements":[
|
||||
[1,"stat","hp",10],
|
||||
@@ -1014,7 +1014,7 @@ monsters={
|
||||
[5000,"stat","gold",5],
|
||||
]
|
||||
},
|
||||
"goldenbot":{
|
||||
"goldenbot":{
|
||||
"name":"Golden Bot","speed":24,"hp":500000,"xp":420000,"attack":500,"damage_type":"physical","respawn":-1,"gold":120000,"range":35,"frequency":1,"aggro":0.2,"aa":1,
|
||||
"difficulty":100,
|
||||
"phresistance":75,
|
||||
@@ -1315,12 +1315,12 @@ monsters={
|
||||
"name":"Mech-a Gnome","speed":1,"charge":120,"hp":164000,"xp":80000,"attack":48,"damage_type":"physical","respawn":480,"gold":6000,"range":30,"frequency":4,"aggro":0,"rage":0,"resistance":600,"armor":600,"abilities":{"portal":{"cooldown":0}},
|
||||
"achievements":[
|
||||
[1,"stat","hp",10],
|
||||
[100,"stat","hp",20],
|
||||
[1000,"stat","vit",1],
|
||||
[10000,"stat","dex",1],
|
||||
[100000,"stat","attack",5],
|
||||
[1000000,"stat","vit",5],
|
||||
[10000000,"stat","lifesteal",1.25],
|
||||
[10,"stat","hp",20],
|
||||
[100,"stat","vit",1],
|
||||
[1000,"stat","dex",1],
|
||||
[10000,"stat","attack",5],
|
||||
[100000,"stat","vit",5],
|
||||
[1000000,"stat","lifesteal",1.25],
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@@ -891,6 +891,13 @@ npcs={
|
||||
"type":"fullstatic",
|
||||
"name":"Smith",
|
||||
},
|
||||
"scrollsmith":{
|
||||
"role":"scrollsmith",
|
||||
"skin":"bsoldier",
|
||||
"says":"X",
|
||||
"type":"fullstatic",
|
||||
"name":"Sir Bob",
|
||||
},
|
||||
"transporter":{
|
||||
"role":"transport",
|
||||
"skin":"spell",
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -372,7 +372,7 @@ sprites={
|
||||
"columns":4,
|
||||
"matrix":[
|
||||
[None,"nexus",None,None],
|
||||
[None,None,None,None],
|
||||
[None,None,"bsoldier",None],
|
||||
]
|
||||
},
|
||||
"military3":{
|
||||
|
||||
+10
-1
@@ -2953,6 +2953,14 @@ function lock_item(num)
|
||||
return push_deferred("locksmith");
|
||||
}
|
||||
|
||||
function destat_item(num)
|
||||
{
|
||||
if(num===undefined) num=s_item;
|
||||
socket.emit("destat",{num:num});
|
||||
return push_deferred("destat");
|
||||
}
|
||||
|
||||
|
||||
function seal_item(num)
|
||||
{
|
||||
if(num===undefined) num=l_item;
|
||||
@@ -3204,6 +3212,7 @@ function reopen()
|
||||
else if(rendered_target=="dismantler") render_dismantler();
|
||||
else if(rendered_target=="none") render_none_shrine();
|
||||
else if(rendered_target=="locksmith") render_locksmith();
|
||||
else if(rendered_target=="scrollsmith") render_scrollsmith();
|
||||
// else if(rendered_target=="secondhands") render_secondhands(); // Manual resets
|
||||
if(inventory) reset_inventory();
|
||||
|
||||
@@ -3270,7 +3279,7 @@ function reset_inventory(condition)
|
||||
{
|
||||
if(inventory)
|
||||
{
|
||||
if(condition && !in_arr(rendered_target,["upgrade","compound","exchange","npc","merchant","craftsman","dismantler","none","locksmith"])) return;
|
||||
if(condition && !in_arr(rendered_target,["upgrade","compound","exchange","npc","merchant","craftsman","dismantler","none","locksmith","scrollsmith"])) return;
|
||||
render_inventory(true);
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -2194,6 +2194,15 @@ function init_socket(args)
|
||||
}
|
||||
else if(response=="magiport_failed") ui_log("Magiport failed","gray"),no_no_no(2);
|
||||
else if(response=="revive_failed") ui_log("Revival failed","gray"),no_no_no(1);
|
||||
else if(response=="scrollsmith_cant")
|
||||
{
|
||||
ui_log("Can't destat this item","gray")
|
||||
}
|
||||
else if(response=="scrollsmith_success")
|
||||
{
|
||||
ui_log("Spent " + data.gold.toLocaleString() + " gold","gray");
|
||||
ui_log("De-statted the item","gray");
|
||||
}
|
||||
else if(response=="locksmith_cant")
|
||||
{
|
||||
ui_log("Can't lock/unlock this item","gray")
|
||||
@@ -3295,6 +3304,10 @@ function npc_right_click(event){
|
||||
{
|
||||
render_interaction({auto:true,dialog:"locksmith",skin:"asoldier"});
|
||||
}
|
||||
if(this.role=="scrollsmith")
|
||||
{
|
||||
render_interaction({auto:true,dialog:"scrollsmith",skin:"bsoldier"});
|
||||
}
|
||||
if(this.role=="compound")
|
||||
{
|
||||
render_compound_shrine(1);
|
||||
|
||||
+42
-1
@@ -1,4 +1,4 @@
|
||||
var u_item=null,u_scroll=null,u_offering=null,c_items=e_array(3),c_scroll=null,c_offering=null,c_last=0,e_item=null,p_item=null,l_item=null,cr_items=e_array(9),cr_last=0,ds_item=null;
|
||||
var u_item=null,u_scroll=null,u_offering=null,c_items=e_array(3),c_scroll=null,c_offering=null,c_last=0,e_item=null,p_item=null,l_item=null,s_item=null,cr_items=e_array(9),cr_last=0,ds_item=null;
|
||||
|
||||
var settings_shown=0;
|
||||
function show_settings()
|
||||
@@ -1142,6 +1142,30 @@ function render_locksmith(mode)
|
||||
if(!inventory) render_inventory(),inventory_opened_for=topleft_npc;
|
||||
}
|
||||
|
||||
function render_scrollsmith()
|
||||
{
|
||||
var button="DE-STAT",f="destat_item",shade="shade_chest";
|
||||
reset_inventory(1);
|
||||
topleft_npc="scrollsmith"; rendered_target=topleft_npc;
|
||||
s_item=null;
|
||||
var html="<div style='background-color: black; border: 5px solid gray; padding: 20px; font-size: 24px; display: inline-block; vertical-align: top; text-align: center'>";
|
||||
/*html+="<div class='ering ering1 mb10'>";
|
||||
html+="<div class='ering ering2'>";
|
||||
html+="<div class='ering ering3'>";
|
||||
//html+="<div class='ering ering4'>";*/
|
||||
html+="<div>";
|
||||
html+=item_container({shade:shade,cid:'sitem',s_op:0.4,draggable:false,droppable:true});
|
||||
html+="</div>";
|
||||
//html+="</div>";
|
||||
/*html+="</div>";
|
||||
html+="</div>";
|
||||
html+="</div>";*/
|
||||
html+="<div style='margin-top: 12px'><div class='gamebutton clickable' onclick='"+f+"()'>"+button+"</div></div>";
|
||||
html+="</div>";
|
||||
$("#topleftcornerui").html(html);
|
||||
if(!inventory) render_inventory(),inventory_opened_for=topleft_npc;
|
||||
}
|
||||
|
||||
function render_recipe(element,type,name)
|
||||
{
|
||||
last_selector="#recipe-item";
|
||||
@@ -2201,6 +2225,7 @@ function render_skill(selector,skill_name,args)
|
||||
if(skill.range_multiplier && skill.range_bonus) html+=bold_prop_line("Range",to_pretty_float(skill.range_multiplier||1)+"X + "+skill.range_bonus,"gray");
|
||||
else if(skill.range_multiplier) html+=bold_prop_line("Range",to_pretty_float(skill.range_multiplier||1)+"X of Character Range","gray");
|
||||
if(skill.level) html+=bold_prop_line("Level Requirement",skill.level,"gray");
|
||||
if(skill.wtype) html+=bold_prop_line("Weapon Requirement", is_array(skill.wtype) ? skill.wtype.join(", ") : skill.wtype,"gray");
|
||||
if(skill.max) html+=bold_prop_line("Max",skill.max,"gray");
|
||||
if(skill.type=="passive") html+="<div><span style='color: #696C68;'>Passive</span></div>";
|
||||
if(skill.damage_type)
|
||||
@@ -3741,6 +3766,17 @@ function on_rclick(current)
|
||||
$("#citem"+inum).parent().html("");
|
||||
$("#litem").html(html);
|
||||
}
|
||||
else if(topleft_npc=="scrollsmith")
|
||||
{
|
||||
var current=character.items[inum],def=null;
|
||||
if(current) def=G.items[current.name];
|
||||
if(!def) return;
|
||||
if(s_item!==null) return;
|
||||
s_item=inum; cache_i[inum]=-1;
|
||||
var html=$("#citem"+inum).all_html();
|
||||
$("#citem"+inum).parent().html("");
|
||||
$("#sitem").html(html);
|
||||
}
|
||||
else if(topleft_npc=="upgrade")
|
||||
{
|
||||
var current=character.items[inum],def=null;
|
||||
@@ -4634,6 +4670,11 @@ function render_interaction(type,sub_type,args)
|
||||
html+="Lock - Prevents anything that can destroy an item, selling, upgrading, you name it! Seal - Locks the item in a way that unlocking it takes two days. Unlock - Frees it. Got it? Good. Cost? 250 big ones.";
|
||||
html+="<span style='float: right; margin-top: 5px'><div class='slimbutton' onclick='render_locksmith(\"lock\")'>LOCK</div> <div class='slimbutton' onclick='render_locksmith(\"seal\")'>SEAL</div> <div class='slimbutton' onclick='render_locksmith(\"unlock\")'>UNLOCK</div></span>";
|
||||
}
|
||||
else if(type=="scrollsmith")
|
||||
{
|
||||
html+="De-stat an item. Give you back the scrolls used on the item, as though the item were level 0. Returns the item back to you along with scrolls. Got it? Good. Cost? Depends on the scroll. 10 times the value of the scrolls that will be returned to you.";
|
||||
html+="<span style='float: right; margin-top: 5px'><div class='slimbutton' onclick='render_scrollsmith()'>DE-STAT</div></span>";
|
||||
}
|
||||
else if(type=="crafting")
|
||||
{
|
||||
html+="I can craft or dismantle items for you. Price differs from item to item. Check out my recipes if you are interested!";
|
||||
|
||||
+49
-4
@@ -171,8 +171,8 @@ var events = {
|
||||
// SEASONS
|
||||
holidayseason: false,
|
||||
lunarnewyear: false,
|
||||
valentines: false,
|
||||
pinkgoo: 0, // every N minutes - 60
|
||||
valentines: true,
|
||||
pinkgoo: 60, // every N minutes - 60
|
||||
snowman: 20 * 60, // 1200 normally - 60 - at sprocess_game_data
|
||||
egghunt: 0, // every N minutes - 60
|
||||
halloween: false,
|
||||
@@ -5604,6 +5604,48 @@ function init_io() {
|
||||
resend(player, "reopen+nc+inv");
|
||||
success_response({ num: num, cevent: true });
|
||||
});
|
||||
|
||||
socket.on("destat", function (data) {
|
||||
var player = players[socket.id];
|
||||
if (!player || player.user) {
|
||||
return fail_response("cant_in_bank");
|
||||
}
|
||||
if (!player.computer && simple_distance(G.maps.desertland.ref.scrollsmith, player) > B.sell_dist) {
|
||||
return fail_response("distance");
|
||||
}
|
||||
var item = player.items[data.num];
|
||||
if (!item) {
|
||||
return fail_response("no_item");
|
||||
}
|
||||
var def = G.items[item.name];
|
||||
if (item.stat_type == null) {
|
||||
return fail_response("scrollsmith_cant");
|
||||
}
|
||||
var scrolltype = item.stat_type + "scroll";
|
||||
if (scrolltype == "mp_costscroll") {
|
||||
scrolltype = "mpcostscroll";
|
||||
}
|
||||
var scrolldef = G.items[scrolltype];
|
||||
if (!scrolldef) {
|
||||
return fail_response("scrollsmith_cant"); // Just in case there isn't actually an item associated with the scroll... should never happen, though.
|
||||
}
|
||||
var needed = [1, 10, 100, 1000, 9999, 9999, 9999];
|
||||
var ograde = calculate_item_grade(def, { name: item.name, level: 0 });
|
||||
var cost = needed[ograde] * scrolldef.g * 10;
|
||||
if (player.gold < cost) {
|
||||
return fail_response("gold_not_enough");
|
||||
}
|
||||
if (!can_add_items(player, list_to_pseudo_items([[needed[ograde], scrolltype]]))) {
|
||||
return fail_response("inv_size");
|
||||
}
|
||||
player.gold -= cost;
|
||||
add_item(player, scrolltype, { q: needed[ograde] });
|
||||
delete item.stat_type;
|
||||
socket.emit("game_response", { response: "scrollsmith_success", gold: cost });
|
||||
player.citems[data.num] = cache_item(player.items[data.num]);
|
||||
resend(player, "reopen+nc");
|
||||
success_response();
|
||||
});
|
||||
socket.on("locksmith", function (data) {
|
||||
var player = players[socket.id];
|
||||
var item = player.items[data.item_num];
|
||||
@@ -6594,8 +6636,11 @@ function init_io() {
|
||||
new_monster(player.in, { type: def.spawn, stype: "trap", x: player.x, y: player.y, owner: player.name });
|
||||
consume_one(player, data.num);
|
||||
} else if (def.gives) {
|
||||
if (player.last.potion && mssince(player.last.potion) < 0) {
|
||||
return fail_response("not_ready");
|
||||
if (player.last.potion) {
|
||||
const ms = -mssince(player.last.potion);
|
||||
if (ms > 0) {
|
||||
return fail_response("not_ready", { ms: ms });
|
||||
}
|
||||
}
|
||||
if (item.l) {
|
||||
return fail_response("item_locked");
|
||||
|
||||
Reference in New Issue
Block a user