The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Playful Minions and Snowballs
Author Message
Saint
Apprentice
*

Posts: 14
Likes Given: 3
Likes Received: 4 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #1
Playful Minions and Snowballs
Looking for a snowball script basically white ball when thrown interrupts actions and causes loss of stam.

And is there anyway to give certain items to npcs and then when seeing a player in LOS will use said items.

Ideally

I'm looking to make playful ice mongbats and give them x snowballs and then they will throw these at players while snickering.

bonus points if you can make a snow effect on being hit. just the gheal animation recolored.

I've been through a few the scripting for dummies which I clearly am and this is what I have so far Sad
Quote:[ITEMDEF i_snowball]
[ITEMDEF i_snowball]
Name=Snowball
ID=i_fruit_coconut
TYPE=t_script

ON=@CREATE
COLOR=0481

ON=@DCLICK
////Check to see if its in your bag
IF (in bag)
Target
Else
(can't use where its at)

ON=@TARGET
(Throw snowball)

PS if anyone want to make a video tutorial making interesting little items I'd definitely subscribe and it would make learning much easier.
08-05-2015 05:50 PM
Find all posts by this user Like Post Quote this message in a reply
JohnVeritas
Apprentice
*

Posts: 49
Likes Given: 0
Likes Received: 4 in 4 posts
Joined: Feb 2014
Reputation: 2



Post: #2
RE: Playful Minions and Snowballs
Hi I can help you for some of them;

Code:
on=@dclick
if (<topobj> != <src>)
src.sysmessage @,,1 You can't use where its at.
return 1
else
src.target
return 1
endif

on=@targon_char // I put return 1 in every check for avoid more than 1 error in same time
IF (<src.targ.uid>==<src.uid>)
src.sysmessage @,,1 You can't shoot a snowball yourself
return 1
elseif !(<src.targ.canseelos>)
src.sysmessage @,,1 You can't see the target.
return 1
else
src.anim 11 // animation
src.stam -= < your choise >
src.consume 1 i_snowball
src.targ.skill fail
src.targ.emote argh
src.targ.effect 0,0f27,10
src.targ.anim 20
src.targ.newitem=i_fx_smoke
src.targ.act.p=<src.targ.p>
endif
08-08-2015 09:00 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #3
RE: Playful Minions and Snowballs
Code:
03-01-2014, Ben
Fixed #2256: Reworked NPC object throwing..
->canseelos checks now applies to overrides
->changed tag.override.rock to NPC variable THROWOBJ (can take numerical or string ID now)
->changed tag.override.dam to NPC varialbe THROWDAM min,max (can also be "THROWDAM max" for non variating damage)
->added THROWRANGE min,max  (can also be "THROWRANGE max" with a min of 2 by default)
->All 3 variables are available on dynamic npc or in CHARDEF

Using this will make NPCs to throw the THROWOBJ item like ogres throws rocks.
08-09-2015 01:46 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)