Skip to content

Commit

Permalink
Merge branch 'develop' into T2A_Armor_Weapons
Browse files Browse the repository at this point in the history
  • Loading branch information
Xoduz authored Nov 11, 2023
2 parents e81182a + f97faed commit 643b6e2
Show file tree
Hide file tree
Showing 18 changed files with 83 additions and 15 deletions.
14 changes: 14 additions & 0 deletions data/dfndata/items/gear/clothing/tol_clothing.dfn
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[FirstAidBelt]
{
get=base_clothing
name=First Aid Belt
id=0xA1F6
type=1
weight=100
weightmax=40000
maxitems=10000
layer=0x12
script=5049
custominttag=healingBonus 15
origin=tol
}
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.CSY
Original file line number Diff line number Diff line change
Expand Up @@ -5149,5 +5149,7 @@
18769=Barviva a kádinka s barvivy byly umístěny do tvého batohu.
18770=Toto je polovina výherního lístku! Dvakrát klikni na tento tip a zaměř jakýkoli jiný tip označený jako NOVÝ HRÁČ a získej výhru! Tento los bude fungovat pouze pro TEBE, takže ho nikomu nedávej!
18771=Plná sada rangerské zbroje.
// [18800-19000] Vlastnosti AOS
18800=%i% Bonus za hojení obvazů
}
EOF
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.ENG
Original file line number Diff line number Diff line change
Expand Up @@ -5149,5 +5149,7 @@
18769=The dyes and dye tub have been placed in your backpack.
18770=This is half a prize ticket! Double-click this ticket and target any other ticket marked NEW PLAYER and get a prize! This ticket will only work for YOU, so don’t give it away!
18771=A full set of ranger armor.
// [18800-19000] AOS properties
18800=%i% Bandage Healing Bonus
}
EOF
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.FRE
Original file line number Diff line number Diff line change
Expand Up @@ -5305,5 +5305,7 @@
18769=Les teintures et le bac à teinture ont été placés dans votre sac à dos.
18770=Voici la moitié d'un ticket de prix ! Double-cliquez sur ce ticket et ciblez n'importe quel autre ticket marqué NEW PLAYER et obtenez un prix ! Ce ticket ne fonctionnera que pour TOI, alors ne le donne pas !
18771=Une armure de ranger complète.
// [18800-19000] Propriétés de l’AOS
18800=%i% Bonus de soins de bandage
}
EOF
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.GER
Original file line number Diff line number Diff line change
Expand Up @@ -5149,5 +5149,7 @@
18769=Die Färbemittel und der Färbebecher wurden in deinen Rucksack gelegt.
18770=Dies ist ein halber Gewinnschein! Doppelklicke auf dieses Ticket und auf ein beliebiges anderes Ticket mit der Aufschrift NEUER SPIELER und du bekommst einen Preis! Dieses Ticket funktioniert nur für dich, also verschenke es nicht!
18771=Ein kompletter Satz Waldläufer-Rüstung.
// [18800-19000] AOS-Eigenschaften
18800=%i% Verbandsheilungsbonus
}
EOF
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.ITA
Original file line number Diff line number Diff line change
Expand Up @@ -5149,5 +5149,7 @@
18769=I coloranti e la vasca per i coloranti sono stati messi nel tuo zaino.
18770=Questo è mezzo biglietto premio! Fai doppio clic su questo biglietto e punta su qualsiasi altro biglietto con la dicitura NUOVO GIOCATORE per ottenere un premio! Questo biglietto funzionerà solo per te, quindi non darlo via!
18771=Un set completo di armatura da ranger.
// [18800-19000] Proprietà AOS
18800=%i% Bonus di guarigione della benda
}
EOF
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.POL
Original file line number Diff line number Diff line change
Expand Up @@ -5149,5 +5149,7 @@
18769=Barwniki i pojemnik na barwniki zostały umieszczone w twoim plecaku.
18770=To jest połowa biletu z nagrodą! Kliknij dwukrotnie ten bilet i wybierz dowolny inny bilet oznaczony jako NOWY GRACZ, a otrzymasz nagrodę! Ten bilet będzie działał tylko dla CIEBIE, więc go nie rozdawaj!
18771=Pełny zestaw zbroi strażnika.
// [18800-19000] Właściwości AOS
18800=%i% Premia do leczenia bandażem
}
EOF
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.PTG
Original file line number Diff line number Diff line change
Expand Up @@ -5149,5 +5149,7 @@
18769=As tinturas e o tubo de tinturas foram colocados na tua mochila.
18770=Isto é metade de um bilhete premiado! Faz duplo clique neste bilhete e aponta para qualquer outro bilhete marcado NOVO JOGADOR e ganha um prémio! Este bilhete só serve para ti, por isso não o dês de mão beijada!
18771=Um conjunto completo de armadura de guarda-florestal.
// [18800-19000] Propriedades AOS
18800=%i% Bônus de cura de curativo
}
EOF
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.SPA
Original file line number Diff line number Diff line change
Expand Up @@ -5149,5 +5149,7 @@
18769=Los tintes y la tina de tintes han sido colocados en tu mochila.
18770=¡Este es medio billete de premio! Haga doble clic en este billete y apunte a cualquier otro billete marcado como NUEVO JUGADOR ¡y consiga un premio! Este billete sólo te servirá a TI, ¡así que no lo regales!
18771=Un conjunto completo de armadura de guardabosques.
// [18800-19000] Propiedades AOS
18800=%i% Bonificación de curación de vendaje
}
EOF
2 changes: 2 additions & 0 deletions data/dictionaries/dictionary.ZRO
Original file line number Diff line number Diff line change
Expand Up @@ -5143,5 +5143,7 @@
18769=The dyes and dye tub have been placed in your backpack.
18770=This is half a prize ticket! Double-click this ticket and target any other ticket marked NEW PLAYER and get a prize! This ticket will only work for YOU, so don’t give it away!
18771=A full set of ranger armor.
// [18800-19000] AOS properties
18800=%i% Bandage Healing Bonus
}
EOF
6 changes: 6 additions & 0 deletions data/js/item/equip_effects/bandagehealingbonus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function onTooltip( equipment, pSocket )
{
var healingBonus = parseInt( equipment.GetTag( "healingBonus" ));
var tooltipText = GetDictionaryEntry(18800, pSocket.language ); // %i% Bandage Healing Bonus
return tooltipText.replace( /%i/gi, healingBonus );
}
8 changes: 4 additions & 4 deletions data/js/item/equip_effects/skill_boosting_equipment.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function onEquip( pEquipper, iEquipped )
switch( skillBonusID )
{
case 7: // Blacksmithing
pEquipper.baseskills.blacksmithing += skillBonusVal;
pEquipper.skills.blacksmithing += skillBonusVal;
break;
case 45: // Mining
pEquipper.baseskills.mining += skillBonusVal;
pEquipper.skills.mining += skillBonusVal;
break;
default:
break;
Expand All @@ -39,10 +39,10 @@ function onUnequip( pUnquipper, iUnequipped )
switch( skillBonusID )
{
case 7: // Blacksmithing
pUnquipper.baseskills.blacksmithing -= skillBonusVal;
pUnquipper.skills.blacksmithing -= skillBonusVal;
break;
case 45: // Mining
pUnquipper.baseskills.mining -= skillBonusVal;
pUnquipper.skills.mining -= skillBonusVal;
break;
default:
break;
Expand Down
17 changes: 10 additions & 7 deletions data/js/item/smallbod.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ function onUseChecked( pUser, smallBOD )
}
else
{
// Store iUsed as a custom property on pUser
pUser.bodItem = smallBOD;

var init = smallBOD.GetTag( "init" ) // just to make sure we dont set the bod over
if( init == false ) // Keep from resetting the amount needed.
{
Expand Down Expand Up @@ -91,6 +88,8 @@ function SmallBODGump( pUser, smallBOD )
var socket = pUser.socket;
var bodGump = new Gump;

pUser.bodItem = smallBOD; // Store BOD on the user for access in callbacks.

bodGump.AddPage( 0 );

bodGump.AddBackground( 50, 10, 455, 260, 5054 );
Expand Down Expand Up @@ -201,6 +200,7 @@ function onGumpPress( socket, pButton, gumpData )
delete pUser.bodItem; // Remove bodItem as a temporary property on pUser
break;
case 1:
SmallBODGump(pUser, smallBOD);
CombineItemWithBod( pUser, smallBOD );
break;
}
Expand Down Expand Up @@ -238,10 +238,13 @@ function onCallback0( socket, myTarget )
var bodItemID = smallBOD.GetTag( "graphicID" );
delete pUser.bodItem; // Remove bodItem as a temporary property on pUser

// Abort if player cancels target cursor
// Abort if player cancels target cursor or clicks empty space.
var cancelCheck = parseInt( socket.GetByte( 11 ));
if( cancelCheck == 255 )
if( cancelCheck == 255 || !myTarget )
{
SmallBODGump( pUser, smallBOD );
return;
}

if( !socket.GetWord( 1 ) && myTarget.isItem && ( myTarget.sectionID == bodSectionID ) || ( myTarget.id == bodItemID && myTarget.name == bodItemName ))
{
Expand Down Expand Up @@ -352,11 +355,11 @@ function onCallback0( socket, myTarget )

myTarget.Delete();
pUser.TextMessage( GetDictionaryEntry( 17263, socket.language ), false, 0x3b2, 0, pUser.serial ); // The item has been combined with the deed.
if( amountCur < amountMax )
if( amountCur + 1 < amountMax )
{
pUser.CustomTarget( 0 );
SmallBODGump( pUser, smallBOD );
}
SmallBODGump( pUser, smallBOD );
}
}
}
Expand Down
1 change: 1 addition & 0 deletions data/js/jse_fileassociations.scp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@
5046=item/corpse.js
5047=item/consumables/new_player_ticket.js
5048=item/teleport_item.js
5049=item/equip_effects/bandagehealingbonus.js

//-------------------------------------------
// Camps [5500-5599]
Expand Down
6 changes: 3 additions & 3 deletions data/js/npc/ai/vendor_bdo_dispenser.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,17 +694,17 @@ function DispenseBODRewards( pDropper, npcDroppedOn, iDropped )
minReward = 0 + minMaxMod[0];
maxReward = 16 + minMaxMod[1];

switch( WeightedRandom( minReward, maxReward, weightVal ))
switch( WeightedRandom( minReward, maxReward, weightVal ) )
{
case 0: // Sturdy Pickaxe / Sturdy Shovel (equal chance)
switch( RandomNumber( 0, 1 ))
switch( RandomNumber( 0, 1 ) )
{
case 0: // Sturdy Pickaxe
bodRewardItem = CreateBODReward( 0, socket, pDropper, 0 );
break;
case 1: // Sturdy Shovel
break;
bodRewardItem = CreateBODReward( 1, socket, pDropper, 0 );
break;
default:
break;
}
Expand Down
12 changes: 11 additions & 1 deletion data/js/skill/healing.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,16 @@ function onTimer( mChar, timerID )
}
else if( mChar.CheckSkill( skillNum, 0, healthLoss * 10 )) // Requires higher and higher amount of health lost in order for healer to gain skill
{
var mItem;
var healBonus;
for( mItem = mChar.FirstItem(); !mChar.FinishedItems(); mItem = mChar.NextItem() )
{
if( !ValidateObject( mItem ))
continue;

healBonus += parseInt( mItem.GetTag( "healingBonus" ) );
}

// Increase karma when healing innocent/neutral characters
if( ourObj != mChar && ( ourObj.innocent || ourObj.neutral ))
{
Expand Down Expand Up @@ -470,7 +480,7 @@ function onTimer( mChar, timerID )
}
else
{
ourObj.Heal( healAmt, mChar );
ourObj.Heal(healAmt * (healBonus / 100), mChar );
socket.SysMessage( GetDictionaryEntry( 1271, socket.language )); // You apply the bandages and the patient looks a bit healthier.
}
}
Expand Down
9 changes: 9 additions & 0 deletions source/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
10/11/2023 - Dragon Slayer
Added IDs for stocking items to cItem::GetPackType() in items.cpp, so they can be used as containers

29/10/2023 - Dragon Slayer, Xuri
Added DFN entries for first aid belt. (dfn item/gear/clothing/ej_clothing)
Added First Aid Belt ID to backpack type. (cpp items)
Added bandage healing bonus to healing. (js healing)
Added JS script bandagehealingbonus (js items/equip_effect/bandagehealingbonus)

28/10/2023 - Dragon Slayer (0.99.6a)
Added DFN entries for hallow pumpkins, jack o lanterns and halloween decorations. (dfn item/misc/halloween)
Added DFN entrie for killerpumpkin in daemons.dfn. (dfn daemons)
Expand Down
7 changes: 7 additions & 0 deletions source/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,7 @@ PackTypes cItem::GetPackType( CItem *i )
case 0x0E75: // backpack
case 0x0E79: // pouch
case 0x09B0: // pouch
case 0xA1F6: // First Aid Belt
packType = PT_PACK;
break;
case 0x0E76: // leather bag
Expand Down Expand Up @@ -1518,6 +1519,12 @@ PackTypes cItem::GetPackType( CItem *i )
packType = PT_PACK2;
}
break;
case 0x2bd9:
case 0x2BDA:
case 0x2BDB:
case 0x2BDC:
packType = PT_STOCKING;
break;
case 0x232A: // giftbox
case 0x232B: // giftbox
packType = PT_GIFTBOX1;
Expand Down

0 comments on commit 643b6e2

Please sign in to comment.