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
Cutting up monster bodies
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #28
RE: Cutting up monster bodies
well mates, i share what i was working in, i hope you like the idea, it still needs alot of work and there might be a thousands of ways to improve it, as you must know ive been learning for a couple weeks though so it was very hard. Had a lot of help from EXTREME and XuN, and also took some ideas from RIDING SKILL so i have no credit at all.
PHP Code:
[DEFNAME SKINNING_SYSTEM
skin_c_dragon            400
skin_c_llama            325

[TYPEDEF T_EVENTS_SKINNER]

on=@TargOn_Item // the corpse to be carved
IF (<ARGO.TYPE> == T_CORPSE) && STRMATCH(*WEAPON*,<TYPE>) // if this is a corpse and is being used a sharped weapon
    
If (<SRC.ISNEARTYPE <argo.type2>)
        if (<
argo.timestamp>)
            
argo.timestamp=0
            
if (<EVAL <DEF.SKIN_C_<SERV.CHARDEF.<eval <ARGO.MOREX>+<ARGO.MOREY>>.name.more1>>> >= <src.skinning>)
                
f_skinning_try
                        
if (<r<EVAL <DEF.SKIN_C_<SERV.CHARDEF.<eval <ARGO.MOREX>+<ARGO.MOREY>>.name.more1>>>> > <src.skinning>) //success
                        
if (<R5> == 1)
                            
f_skinning_success
                            
if (<src.skilltotal> < <src.skillclass.skillsum>)
                                if (<
src.skinning> < <src.skillclass.<serv.skill.skinning.key>>)
                                     if (<
r<src.skinning>> <= 10// gain skill chance
                                        
src.skinning += 1
                                        src
.sysmessage @0120Your skill in Skinning has increased by 0.1%. It is now <src.skinning>%
                                    endif
                                endif
                            endif
                        endif
                    
                    else
                        
f_skinning_fail
                    
endif

            
elif (<EVAL <DEF.SKIN_C_<SERV.CHARDEF.<eval <ARGO.MOREX>+<ARGO.MOREY>>.name.more1>>> < <src.skinning>)
                
f_skinning_try
                    
if (<r<EVAL <DEF.SKIN_C_<SERV.CHARDEF.<eval <ARGO.MOREX>+<ARGO.MOREY>>.name.more1>>>> < <src.skinning>/5//success
                            
f_skinning_success
                            
if (<src.skilltotal> < <src.skillclass.skillsum>)
                                if (<
src.skinning> < <src.skillclass.<serv.skill.skinning.key>>)
                                     if (<
r<src.skinning>> <= 10// gain skill chance
                                        
src.skinning += 1
                                        src
.sysmessage @0120Your skill in Skinning has increased by 0.1%. It is now <src.skinning>%
                                    endif
                                endif
                            endif
                
                    else
                        
f_skinning_fail
                    
endif
            else
            return 
0
            
ENDIF
        elseif (<
argo.timestamp>==0)
        return 
0
        
endif
    else
    
SRC.SYSMESSAGE You must be near the corpse to carve it.
    endif
 RETURN 
1
ENDIF

on=@userskills
IF (<SERV.SKILL.<ARGN1>.NAME> == Skinning)
        
src.sysmessage @0120Your skill in <Serv.skill.<ARGN1>.Namehas changedit is now <SRC.<ARGN1>>
ENDIF 

[FUNCTION 
f_skinning_success]
REF1 <SRC.TARG>
ARGS=<SERV.CHARDEF.<eval <REF1.MOREX>+<REF1.MOREY>>.RESOURCES>
WHILE !(<
isempty <ARGV[<LOCAL._WHILE>]>>)
SERV.NEWITEM <STREAT <ARGV[<LOCAL._WHILE>]>>,<STRARG <ARGV[<LOCAL._WHILE>]>>
NEW.
CONT <REF1//<SRC.TARG>
ENDWHILE
src.sysmessage You have successfully carved the Corpse!

[FUNCTION 
f_skinning_fail]
REF1 <SRC.TARG>
ARGS = <SERV.CHARDEF.<eval <REF1.MOREX>+<REF1.MOREY>>.RESOURCES>
SERV.NEWITEM <STREAT <ARGV0>>,<STRARG <ARGV0>>
NEW.
CONT <REF1>
src.sysmessage You carve the corpse but find nothing usefull.

[FUNCTION 
f_skinning_try]
REF1 <SRC.TARG>
LOCAL.BLOOD = { i_blood_2 1 i_blood_smear 1 }
SRC.ANIM 11
SERV
.NEWITEM <LOCAL.BLOOD>
NEW.
ATTR 02
NEW.<REF1.p>
NEW.
TIMER 60
NEW.FIX
SERV
.NEWITEM i_blood_pool_large
NEW.<REF1.p>
NEW.
ATTR 02
NEW.TIMER 60*3
NEW.FIX

[EOF

i still need info about gaining skillssum and skilltotal is reached, i dont know what happens, and it still needs some work with else's and elseif's
Enjoy!

PD: on=@userskills trigger doesnt work property, i dont know why, so if you can give me a hand, would be awesome.. TY!

UPDATED Jun 7th
(This post was last modified: 06-08-2014 08:18 AM by kn4tseb.)
06-07-2014 05:17 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Cutting up monster bodies - kn4tseb - 06-04-2014, 02:53 PM
RE: Cutting up monster bodies - Extreme - 06-04-2014, 03:12 PM
RE: Cutting up monster bodies - kn4tseb - 06-04-2014, 04:34 PM
RE: Cutting up monster bodies - Extreme - 06-05-2014, 02:00 AM
RE: Cutting up monster bodies - kn4tseb - 06-05-2014, 04:48 AM
RE: Cutting up monster bodies - Extreme - 06-05-2014, 05:05 AM
RE: Cutting up monster bodies - kn4tseb - 06-05-2014, 05:14 AM
RE: Cutting up monster bodies - darksun84 - 06-05-2014, 06:12 AM
RE: Cutting up monster bodies - kn4tseb - 06-05-2014, 06:15 AM
RE: Cutting up monster bodies - Extreme - 06-05-2014, 07:22 AM
RE: Cutting up monster bodies - kn4tseb - 06-05-2014, 02:47 PM
RE: Cutting up monster bodies - Extreme - 06-06-2014, 01:41 AM
RE: Cutting up monster bodies - kn4tseb - 06-06-2014, 02:18 AM
RE: Cutting up monster bodies - kn4tseb - 06-06-2014, 08:55 AM
RE: Cutting up monster bodies - Extreme - 06-06-2014, 12:52 PM
RE: Cutting up monster bodies - kn4tseb - 06-06-2014, 01:52 PM
RE: Cutting up monster bodies - Extreme - 06-06-2014, 02:13 PM
RE: Cutting up monster bodies - kn4tseb - 06-06-2014, 02:14 PM
RE: Cutting up monster bodies - Mordaunt - 06-06-2014, 04:45 PM
RE: Cutting up monster bodies - XuN - 06-06-2014, 10:50 PM
RE: Cutting up monster bodies - kn4tseb - 06-07-2014, 12:14 AM
RE: Cutting up monster bodies - kn4tseb - 06-07-2014, 05:40 AM
RE: Cutting up monster bodies - kn4tseb - 06-07-2014, 07:41 AM
RE: Cutting up monster bodies - Extreme - 06-07-2014, 08:20 AM
RE: Cutting up monster bodies - kn4tseb - 06-07-2014, 11:15 AM
RE: Cutting up monster bodies - Extreme - 06-07-2014, 12:02 PM
RE: Cutting up monster bodies - kn4tseb - 06-07-2014, 02:21 PM
RE: Cutting up monster bodies - kn4tseb - 06-07-2014 05:17 PM
RE: Cutting up monster bodies - kn4tseb - 06-08-2014, 08:17 AM
RE: Cutting up monster bodies - XuN - 06-08-2014, 06:30 PM
RE: Cutting up monster bodies - kn4tseb - 06-09-2014, 02:44 AM

Forum Jump:


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