diff --git a/pack/varp.pack b/pack/varp.pack index fb11577ff6..abb05ddae4 100644 --- a/pack/varp.pack +++ b/pack/varp.pack @@ -382,7 +382,7 @@ 381=castlewars_clock 382=hauntedmine 383=hauntedmine_bits -384=varp_384 +384=xmas_yoyo_unlocked 385=troll_love 386=wearing_sled 387=routequest diff --git a/scripts/_unpack/289/all.npc b/scripts/_unpack/289/all.npc index 984b749e11..11c2539fd1 100644 --- a/scripts/_unpack/289/all.npc +++ b/scripts/_unpack/289/all.npc @@ -573,43 +573,6 @@ model2=model_2964_npc model3=model_2965_npc wanderrange=8 -[santa_claus] -vislevel=hide -name=Santa -desc=He knows if you've been naughty or nice. -walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r -readyanim=human_ready -minimap=no -alwaysontop=yes -op1=Talk-to -model1=man_head_shorthair2 -model2=man_hat_santa -model3=man_torso_fat -model4=man_legs_viking -model5=man_feet_viking_boots -model6=man_arms_longsleeves2 -model7=man_hands_largeblackgloves -model8=man_jaw_santa -model9=man_torsoextra_buttonsfat -head1=chat_male_head_bald -head2=chat_male_jaw_long -head3=chat_male_headextra_santa -recol1s=6273 -recol1d=22197 -recol2s=7328 -recol2d=29594 -recol3s=14724 -recol3d=17441 -recol4s=2340 -recol4d=17441 -recol5s=21001 -recol5d=29594 -recol6s=8388 -recol6d=0 -wanderrange=0 -moverestrict=nomove -defaultmode=none - [trollromance_ug] name=Ug desc=A frail little troll. diff --git a/scripts/_unpack/289/all.obj b/scripts/_unpack/289/all.obj index fed19478af..e071804565 100644 --- a/scripts/_unpack/289/all.obj +++ b/scripts/_unpack/289/all.obj @@ -714,30 +714,6 @@ weight=10g members=yes tradeable=no -[xmas_yoyo] -name=Yo-yo -cost=10 -desc=A gift from Santa. -model=inv_yo -iop1=Play -iop2=Loop -iop3=Walk -iop4=Crazy -weight=10g -2dxof=7 -2dyof=5 -2dzoom=560 -2dyan=2036 -2dxan=196 -tradeable=no - -[xmas_yoyoworn] -name=Xmas yoyoworn -model=human_weapons_yo -wearpos=righthand -manwear=human_weapons_yo,0 -womanwear=human_weapons_yo,6 - [crystalshard_necklace] name=Salve amulet recol1s=13537 diff --git a/scripts/_unpack/289/all.varp b/scripts/_unpack/289/all.varp index e9bdb7aa82..bbe0f920dd 100644 --- a/scripts/_unpack/289/all.varp +++ b/scripts/_unpack/289/all.varp @@ -31,8 +31,6 @@ scope=perm [hauntedmine_bits] scope=perm -[varp_384] - [varp_390] [trawler_water_overlay] diff --git a/scripts/areas/area_draynor/scripts/diango.rs2 b/scripts/areas/area_draynor/scripts/diango.rs2 index 5b676d152a..1587c54ee1 100644 --- a/scripts/areas/area_draynor/scripts/diango.rs2 +++ b/scripts/areas/area_draynor/scripts/diango.rs2 @@ -1,15 +1,22 @@ [opnpc1,aprilfoolshorsesalesman] -~chatnpc("Howdy there partner!|Want to see my toy horseys?"); -@multi2( - "Toy horseys?", aprilfoolshorsesalesman_option1, - "I'm fine, thanks.", exit -); - -// may move these to another script later -[opheld1,horsey_brown] @toy_horsey_say(human_playhorsey_brown); // the anim delay lets the client finish running visually -[opheld1,horsey_white] @toy_horsey_say(human_playhorsey_white); -[opheld1,horsey_black] @toy_horsey_say(human_playhorsey_black); -[opheld1,horsey_grey] @toy_horsey_say(human_playhorsey_grey); +// https://www.youtube.com/watch?v=CqbG_fJ0Yas +~chatnpc("Howdy there partner!"); +~chatplayer("Hi Diango!"); +if(%xmas_yoyo_unlocked = ^true) { + ~chatnpc("Want to see my toy horseys?|Or would you like your yo-yo back?"); + @multi3( + "Toy horseys?", aprilfoolshorsesalesman_option1, + "I'm fine, thanks.", aprilfoolshorsesalesman_option2, + "Can I have my yo-yo back?", aprilfoolshorsesalesman_yoyo + ); +} else { + // guess, based off thessalia + ~chatnpc("Want to see my toy horseys?"); + @multi2( + "Toy horseys?", aprilfoolshorsesalesman_option1, + "I'm fine, thanks.", aprilfoolshorsesalesman_option2 + ); +} [label,aprilfoolshorsesalesman_option1] // todo: this should probably branch into a little conversation before opening the shop @@ -18,6 +25,19 @@ ~chatplayer("Toy horseys?"); ~openshop_activenpc; +[label,aprilfoolshorsesalesman_option2] +~chatplayer("I'm fine, thanks."); + +[label,aprilfoolshorsesalesman_yoyo] +~chatplayer("Can I have my yo-yo back?"); +@aprilfoolshorsesalesman_reclaim_yoyo; + +// may move these to another script later +[opheld1,horsey_brown] @toy_horsey_say(human_playhorsey_brown); // the anim delay lets the client finish running visually +[opheld1,horsey_white] @toy_horsey_say(human_playhorsey_white); +[opheld1,horsey_black] @toy_horsey_say(human_playhorsey_black); +[opheld1,horsey_grey] @toy_horsey_say(human_playhorsey_grey); + [label,toy_horsey_say](seq $anim) p_stopaction; anim($anim, 20); // the anim delay lets the client finish running visually diff --git a/scripts/holidayevents/xmas2004/configs/santa_clause.npc b/scripts/holidayevents/xmas2004/configs/santa_clause.npc new file mode 100644 index 0000000000..c325fa6bb1 --- /dev/null +++ b/scripts/holidayevents/xmas2004/configs/santa_clause.npc @@ -0,0 +1,37 @@ +[santa_claus] +vislevel=hide +name=Santa +desc=He knows if you've been naughty or nice. +walkanim=human_walk_f,human_walk_b,human_walk_l,human_walk_r +readyanim=human_ready +minimap=no +alwaysontop=yes +op1=Talk-to +model1=man_head_shorthair2 +model2=man_hat_santa +model3=man_torso_fat +model4=man_legs_viking +model5=man_feet_viking_boots +model6=man_arms_longsleeves2 +model7=man_hands_largeblackgloves +model8=man_jaw_santa +model9=man_torsoextra_buttonsfat +head1=chat_male_head_bald +head2=chat_male_jaw_long +head3=chat_male_headextra_santa +recol1s=6273 +recol1d=22197 +recol2s=7328 +recol2d=29594 +recol3s=14724 +recol3d=17441 +recol4s=2340 +recol4d=17441 +recol5s=21001 +recol5d=29594 +recol6s=8388 +recol6d=0 +wanderrange=0 +moverestrict=nomove +defaultmode=none +timer=10 \ No newline at end of file diff --git a/scripts/holidayevents/xmas2004/configs/xmas2004.varp b/scripts/holidayevents/xmas2004/configs/xmas2004.varp new file mode 100644 index 0000000000..d55d774c30 --- /dev/null +++ b/scripts/holidayevents/xmas2004/configs/xmas2004.varp @@ -0,0 +1,2 @@ +[xmas_yoyo_unlocked] +scope=perm \ No newline at end of file diff --git a/scripts/holidayevents/xmas2004/configs/xmas_yoyo.obj b/scripts/holidayevents/xmas2004/configs/xmas_yoyo.obj new file mode 100644 index 0000000000..9a77c37cd9 --- /dev/null +++ b/scripts/holidayevents/xmas2004/configs/xmas_yoyo.obj @@ -0,0 +1,23 @@ +[xmas_yoyo] +name=Yo-yo +cost=10 +desc=A gift from Santa. +model=inv_yo +iop1=Play +iop2=Loop +iop3=Walk +iop4=Crazy +weight=10g +2dxof=7 +2dyof=5 +2dzoom=560 +2dyan=2036 +2dxan=196 +tradeable=no + +[xmas_yoyoworn] +name=Xmas yoyoworn +model=human_weapons_yo +wearpos=righthand +manwear=human_weapons_yo,0 +womanwear=human_weapons_yo,6 diff --git a/scripts/holidayevents/xmas2004/scripts/xmas2004.rs2 b/scripts/holidayevents/xmas2004/scripts/xmas2004.rs2 new file mode 100644 index 0000000000..a8b19e06a5 --- /dev/null +++ b/scripts/holidayevents/xmas2004/scripts/xmas2004.rs2 @@ -0,0 +1,72 @@ +[opnpc1,santa_claus] +if(%xmas_yoyo_unlocked = ^true) { + ~chatplayer("I lost my Yo-yo Santa..."); + if(~obj_gettotal(xmas_yoyo) = 0) { + if(inv_freespace(inv) = 0) { + ~mesbox("You need to free up some inventory space before getting another yo-yo from Santa!"); + return; + } + inv_add(inv, xmas_yoyo, 1); + ~chatnpc("Ho Ho Ho|Then you may have another!|Don't forget you can get your Yo-yo returned from Diango in Draynor!"); + return; + } + ~chatnpc("Ho Ho Ho|You've already had your Xmas present this year!"); + return; +} +~chatplayer("Hello there."); +~chatnpc("Ho Ho Ho|Merry Xmas, !"); +~chatnpc("Have you been a good this year?"); +~chatplayer("Yes I have, Santa!"); +~chatnpc("Ho Ho Ho|Then take this present, and have a merry Xmas!"); +if(inv_freespace(inv) = 0) { + mes("You need to free up some inventory space before getting a present from Santa!"); + return; +} +%xmas_yoyo_unlocked = ^true; +inv_add(inv, xmas_yoyo, 1); +~chatnpc("Ho Ho Ho|If you lose your yo-yo, don't forget you can get a replacement from Diango in Draynor!"); +npc_say("Merry Xmas!"); + +[ai_timer,santa_claus] +def_int $rand = random(4); +if($rand = 0) { + npc_say("Merry Xmas!"); + npc_anim(emote_cheer, 0); +} else if($rand = 1) { + npc_say("Come talk to Santa"); + npc_anim(emote_beckon, 0); +} else if($rand = 2) { + npc_say("I love Xmas"); + npc_anim(emote_clap, 0); +} else { + npc_say("Ho Ho Ho"); + npc_anim(emote_laugh, 0); +} + +[opheld1,xmas_yoyo] +anim(yoyo_updown, 2); +sound_synth(yoyo1, 7, 15); + +[opheld2,xmas_yoyo] +anim(yoyo_roundworld, 0); +sound_synth(yoyo2, 0, 15); + +[opheld3,xmas_yoyo] +anim(yoyo_walkdog, 0); +sound_synth(yoyo3, 0, 15); + +[opheld4,xmas_yoyo] +anim(yoyo_advanced, 0); +sound_synth(yoyo4, 0, 15); + +[label,aprilfoolshorsesalesman_reclaim_yoyo] +if(~obj_gettotal(xmas_yoyo) > 0) { + mes("You don't need another yo-yo; you already have one!"); + return; +} +if(inv_freespace(inv) = 0) { + ~chatnpc("Sorry partner, ya need to free up some|inventory space."); + return; +} +inv_add(inv, xmas_yoyo, 1); +~chatnpc("There ya go, partner!|Shoot fer the moon!"); diff --git a/scripts/skill_combat/scripts/combat.rs2 b/scripts/skill_combat/scripts/combat.rs2 index 5e07eb0b5c..c4b8368f9f 100644 --- a/scripts/skill_combat/scripts/combat.rs2 +++ b/scripts/skill_combat/scripts/combat.rs2 @@ -182,9 +182,9 @@ return(human_unarmedblock); [proc,combat_defend_sound](obj $shield)(synth) def_obj $body = inv_getobj(worn, ^wearpos_torso); -if ($shield ! null & oc_param($shield, defend_sound) ! null & (map_members ! ^false | oc_members($shield) = true)) { +if ($shield ! null & oc_param($shield, defend_sound) ! human_hit & (map_members ! ^false | oc_members($shield) = true)) { return(oc_param($shield, defend_sound)); -} else if ($body ! null & oc_param($body, defend_sound) ! null & (map_members ! ^false | oc_members($body) = true)) { +} else if ($body ! null & oc_param($body, defend_sound) ! human_hit & (map_members ! ^false | oc_members($body) = true)) { return(oc_param($body, defend_sound)); } return(human_block_1);