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:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stabler System
Author Message
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #1
Stabler System
PHP Code:
// ###########################################################################​###########################################
// #                                                            #
// #                        Stable Script SYSTEM BY Admin Phoenix aka Levanthis            #
// #                                                            #
// #    You have to redesign the Gump Pics for yourself                                    #
// #                                                            #
// #    Features:                                                    #
// #    Store your pet                                                     #
// #    Storing max Pets Numbers depends from your taming Skill                                #
// #    Sell your pet                                                    #
// #    Buy Pets                                                    #
// ###########################################################################​########################################### 


[DEFNAME stabler_defname]
stabler_budget    2500
stabler_time    12
*60*60

[DIALOG d_stallmenue]
0,0
page 0

ref2
=<src.uid>
FORCONT <FINDLAYER.29.uid1
    
IF (<link.uid> == <ref2.uid>)
        
local.+=1
        local
.name_<dlocal.a>=<name>
        
local.icon_<dlocal.a>=<id>
        
local.color_<dlocal.a>=<color>
    ENDIF
ENDFOR
local.max=<eval <src.taming>/100>
local.max -= <local.a>
IF (<
dlocal.max> == 0)
    
local.max=1
ELSEIF (<dlocal.max> < 0)
    
local.max=0
ENDIF

gumppic 0 0 <hval 08b>

button 520 430 <hval 0f2> <hval 0f11 0 0 // cancel
button 520 405 <hval 0f7> <hval 0f81 0 1 // ok

button 260 106 <hval 037> <hval 0371 0 3 // sell

IF (<dlocal.max> > 0)
    
button 260 139 <hval 037> <hval 0371 0 2 // store pet
ELSE
    
dhtmlgump 260 139 320 60 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>N/A
ENDIF

dhtmlgump 468 195 320 60 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED> <name>, <def.br>the Stabler //name

dhtmlgump 495 312 320 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED> <dlocal.a// stored pet

dhtmlgump 495 382 320 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED> <dlocal.max// max stored

button 260 172 <hval 037> <hval 0370 3 0 // buy

page 1

IF (<dlocal.a> > 0)
    FOR 
b 1 <dlocal.a>
        IF (<
dlocal.b> < 6)
            
local.= <eval <local.b>*40>
            
checkbox 80 <eval <local.y>+190> <hval 02600> <hval 02601<dlocal.b>
            
tilepichue 150 <eval <local.y>+196> <local.icon_<dlocal.b>> <dlocal.color_<dlocal.b>>
            
dhtmlgump 230 <eval <local.y>+195120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED><local.name_<dlocal.b>>
        ENDIF
    ENDFOR
ENDIF

IF (<
dlocal.a> > 5)
    
button 423 395 <hval 08c> <hval 08d0 2 0 // page up
ENDIF

page 2

IF (<dlocal.a> > 5)
    FOR 
b 1 <dlocal.a>
        IF (<
dlocal.b> > 5)
            
local.= <eval (<local.b>-5)*55>
            
checkbox 80 <eval <local.y>+175> <hval 02600> <hval 02601<dlocal.b>
            
tilepichue 150 <eval <local.y>+180> <local.icon_<dlocal.b>> <dlocal.color_<dlocal.b>>
            
dhtmlgump 230 <eval <local.y>+180120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED><local.name_<dlocal.b>>
        ENDIF
    ENDFOR
ENDIF

button 423 395 <hval 08e> <hval 08f0 1 0 // page down

page 3
dhtmlgump 75 205 40 20 0 0 
<def.BFONT_SIZE7> <def.Bfont_DRED>GP

dhtmlgump 75 240 120 20 0 0 
<def.BFONT_SIZE7> <def.Bfont_DRED>75
tilepic 150 230 
<serv.chardef.c_rabbit.ICON>
dhtmlgump 230 240 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>Rabbit
button 360 240 
<hval 037> <hval 0371 0 4 // buy

dhtmlgump 75 270 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>100
tilepic 150 270 
<serv.chardef.c_cat.ICON>
dhtmlgump 230 270 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>Cat
button 360 270 
<hval 037> <hval 0371 0 5 // buy

dhtmlgump 75 300 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>150
tilepic 150 300 
<serv.chardef.c_dog.ICON>
dhtmlgump 230 300 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>Dog
button 360 300 
<hval 037> <hval 0371 0 6 // buy

dhtmlgump 75 330 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>175
tilepic 150 327 
<serv.chardef.c_eagle.ICON>
dhtmlgump 230 330 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>Eagle
button 360 330 
<hval 037> <hval 0371 0 7 // buy

dhtmlgump 75 360 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>200
tilepic 150 345 
<serv.chardef.c_llama_pack.ICON>
dhtmlgump 230 360 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>Pack Lama
button 360 360 
<hval 037> <hval 0371 0 8 // buy

dhtmlgump 75 390 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>230
tilepic 150 380 
<serv.chardef.c_horse_pack.ICON>
dhtmlgump 230 390 120 20 0 0 <def.BFONT_SIZE7> <def.Bfont_DRED>Pack Horse
button 360 390 
<hval 037> <hval 0371 0 9 // buy

[DIALOG d_stallmenue button]
ON=0
smsg 
@<def0.def_smsg_norm>,3 Canceled the action.

ON=1
ref2
=<src.uid>
FORCONT <FINDLAYER.29.uid1
    
IF (<link.uid> == <ref2.uid>)
        
local.+=1
        local
.uid_<dlocal.a>=<uid>
    ENDIF
ENDFOR
FOR 
x 1 <dlocal.a>
    IF (<
argchk[<dlocal.x>]> == 1)
        
uid.<local.uid_<dlocal.x>>.useitem
    
ENDIF
ENDFOR

ON=2
ref2
=<src.uid>
FORCONT <FINDLAYER.29.uid1
    
IF (<link.uid> == <ref2.uid>)
        
local.+=1
    
ENDIF
ENDFOR
local.max=<eval <src.taming>/100>
IF (<
dlocal.max> < 2)
    
local.max=2
ENDIF
local.max -= <local.a>

IF (<
dlocal.max> < 1)
    
src.smsg @<def0.def_smsg_norm>,3 You can not put any more pet here!
ELSE
    if !<
findlayer.layer_bankbox.uid>
        
serv.newitem i_bankbox
        
new.cont = <uid>
        new.
layer 29
    
endif
    
src.targetf f_stable_npc <findlayer.layer_bankbox.uid>
    
src.smsg @<def0.def_smsg_norm>,3 Choose the pet you want to store there.
ENDIF
RETURN 
1

ON
=3
src
.smsg @<def0.def_smsg_norm>,3 Which pet you want to sell?
src.targetf f_sell_animal <uid>

ON=4 10
IF (<argn1> == 4)
    
src.f_stabler_buy 75,i_pet_RABBIT_2,c_rabbit
ELSEIF (<argn1> == 5)
    
src.f_stabler_buy 100,i_pet_CAT,c_cat
ELSEIF (<argn1> == 6)
    
src.f_stabler_buy 150,i_pet_DOG,c_dog
ELSEIF (<argn1> == 7)
    
src.f_stabler_buy 175,i_pet_EAGLE,c_eagle
ELSEIF (<argn1> == 8)
    
src.f_stabler_buy 200,i_pet_llama_pack,c_llama
ELSEIF (<argn1> == 9)
    
src.f_stabler_buy 230,i_pet_horse_pack,c_horse_pack
ENDIF

[FUNCTION 
f_stabler_buy]
local.gold=<dargv[0]>
local.pet=<argv[1]>
local.pet_name=<argv[2]>

IF (<
restest <dlocal.goldi_gold>)
    
serv.newitem=<local.pet>
    new.
bounce
    consume
=<dlocal.goldi_gold
ELSE
    
smsg @<def0.def_smsg_norm>,<serv.chardef.<local.pet_name>.nameis to expensive for you.
ENDIF


[FUNCTION 
f_sell_animal]
ref1=<argo.uid>
ref2=<args>

IF (<
ref1.isplayer>)
    
smsg @<def0.def_smsg_norm>,3 You can not sell players!
ELSEIF !(<
ref1.ischar>)
    
smsg @<def0.def_smsg_norm>,3 You can not sell items!
ELSEIF (<
ref1.uid> == <uid>)
    
smsg @<def0.def_smsg_norm>,3 You can not sell yourself!
ELSEIF !(<
ref1.ismypet>)
    
smsg @<def0.def_smsg_norm>,3 That is not a pet!
ELSEIF (<
ref1.flags>&statf_conjured)
    
smsg @<def0.def_smsg_norm>,3 You can not sell summoned pets!
ELSE
    
local.money=<eval <ref1.taming>/10>
    
newgold=<dlocal.money>
    
smsg @<def0.def_smsg_norm>,3 You sell your pet for <dlocal.moneygold.
    
ref1.remove
ENDIF
RETURN 
1

// Stable function
[function f_stable_npc]
ref1=<argo.uid// pet to store
ref2=<uid// spieler

IF (<ref1> == <ref2>)
    
ref1.smsg @<def0.def_smsg_norm>,3 You can not sell yourself!
    return 
1
ENDIF
IF (<
ref1.memoryfindtype.memory_ipet.link> == <ref2.uid>)
    
ref1.shrink
    FORITEMS 10
        
IF (<type> == t_figurine)
            IF <
more2> == <ref1>
                
ref77 = <uid>
            ENDIF
        ENDIF
    ENDFOR
    
ref77.tag0.control.slots=<local.slot>
    
ref77.link=<ref2.uid>
    
ref77.removefromview
    ref77
.tag0.master = <ref2.uid>
    
ref77.cont = <args>
    
ref2.sysmessage You store your pet.
ENDIF


[
EOF
(This post was last modified: 08-22-2014 03:23 PM by admin phoenix.)
08-20-2014 10:35 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes admin phoenix's post
kn4tseb
Master
**

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



Post: #2
RE: Stabler System
im trying to read it and understand the script, but i dont get whats the i_timer_stabler memory item for =]
08-22-2014 06:47 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #3
RE: Stabler System
(08-22-2014 06:47 AM)kn4tseb Wrote:  im trying to read it and understand the script, but i dont get whats the i_timer_stabler memory item for =]

Nothing or he forgot a part of code.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
08-22-2014 12:55 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #4
RE: Stabler System
I don´t know.
maybe it was a part of another script.
You don´t need it.
I deleted the part of the memory timer Smile
08-22-2014 03:24 PM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

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



Post: #5
RE: Stabler System
i actually used it.. was pretty much helpfull ^^!!

once finished i'll post what i scripted mostly from yours ^^
08-24-2014 08:17 AM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #6
RE: Stabler System
if !<findlayer.layer_bankbox.uid>
serv.newitem i_bankbox
new.cont = <uid>
new.layer = 29
endif
08-24-2014 06:47 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes admin phoenix's post
kn4tseb
Master
**

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



Post: #7
RE: Stabler System
Thats it!! thanks ^^
08-25-2014 12:03 AM
Find all posts by this user Like Post Quote this message in a reply
chrono
Apprentice
*

Posts: 11
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: Sep 2021
Reputation: 0



Post: #8
RE: Stabler System
anyone tried this script in these days?
01-18-2022 07:06 PM
Find all posts by this user Like Post Quote this message in a reply
Aris
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2022
Reputation: 0



Post: #9
RE: Stabler System
Thanks
10-16-2022 11:30 AM
Find all posts by this user Like Post Quote this message in a reply
VIision
Apprentice
*

Posts: 14
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Nov 2024
Reputation: 0



Post: #10
RE: Stabler System
thanks
11-27-2024 02:09 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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