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
Shop Sell packet
Author Message
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #13
RE: Shop Sell packet
Well, what are you trying to do? Are you trying to summon a pet from an animal trainer?

"If" you're looking to add the npc directly from the stablemaster/animaltrainer, here's some code to replace the existing code you have.

Replace this part:
Code:
        for x 1 <local.x>
            uid.<local.item<dlocal.x>>.amount -= <local.item<dlocal.x>.amount>
            if (<uid.<local.item<dlocal.x>>.amount> < 1)
                uid.<local.item<dlocal.x>>.remove
            endif
            if ( <uid.<local.item<dlocal.x>>.can> & 0100 )
                serv.newitem=<uid.<local.item<dlocal.x>>.baseid>
                new.amount=<local.item<dlocal.x>.amount>
                new.cont=<ref1.findlayer.21>
            else
                for <local.item<dlocal.x>.amount>
                    serv.newitem=<uid.<local.item<dlocal.x>>.baseid>
                    new.cont=<ref1.findlayer.21>
                endfor
            endif
            if (strmatch(<local.items>,0))
                local.items=<uid.<local.item<dlocal.x>>.name>
            else
                if !(<local.item<eval <local.x> +1>>)
                    local.items=<local.items>, and <uid.<local.item<dlocal.x>>.name>
                else
                    local.items=<local.items>, <uid.<local.item<dlocal.x>>.name>
                endif
            endif
        endfor
with this:
Code:
        for x 1 <local.x>
            if (<uid.<local.item<dlocal.x>>.type>==t_figurine)
                for 1 <local.item<dlocal.x>.amount>
                    serv.newnpc=<uid.<local.item<dlocal.x>>.tdata3>
                    local.uid=<new.uid>
                    serv.newitem=i_memory
                    new.color=memory_ipet
                    new.link=<ref1.uid>
                    new.cont=<local.uid>
                    uid.<local.uid>.p=<ref2.p>
                    uid.<local.uid>.go=<uid.<local.uid>.p>
                endfor
            elseif ( <uid.<local.item<dlocal.x>>.can> & 0100 )
                serv.newitem=<uid.<local.item<dlocal.x>>.baseid>
                new.amount=<local.item<dlocal.x>.amount>
                new.cont=<ref1.findlayer.21>
            else
                for <local.item<dlocal.x>.amount>
                    serv.newitem=<uid.<local.item<dlocal.x>>.baseid>
                    new.cont=<ref1.findlayer.21>
                endfor
            endif
            if (strmatch(<local.items>,0))
                local.items=<uid.<local.item<dlocal.x>>.name>
            else
                if !(<local.item<eval <local.x> +1>>)
                    local.items=<local.items>, and <uid.<local.item<dlocal.x>>.name>
                else
                    local.items=<local.items>, <uid.<local.item<dlocal.x>>.name>
                endif
            endif
            uid.<local.item<dlocal.x>>.amount -= <local.item<dlocal.x>.amount>
            if (<uid.<local.item<dlocal.x>>.amount> < 1)
                uid.<local.item<dlocal.x>>.remove
            endif
        endfor
I hope that answers your question Smile

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
(This post was last modified: 06-22-2014 02:21 AM by Skul.)
06-22-2014 01:37 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Shop Sell packet - Skul - 06-15-2014, 11:57 AM
RE: Shop Sell packet - Feeh - 06-15-2014, 01:34 PM
RE: Shop Sell packet - Skul - 06-16-2014, 02:19 AM
RE: Shop Sell packet - Feeh - 06-16-2014, 02:53 AM
RE: Shop Sell packet - Skul - 06-16-2014, 03:29 AM
RE: Shop Sell packet - Feeh - 06-16-2014, 04:24 AM
RE: Shop Sell packet - Skul - 06-16-2014, 04:58 AM
RE: Shop Sell packet - mrkarlo - 06-19-2014, 08:14 AM
RE: Shop Sell packet - Skul - 06-19-2014, 11:11 AM
RE: Shop Sell packet - mrkarlo - 06-19-2014, 06:28 PM
RE: Shop Sell packet - Skul - 06-20-2014, 03:19 AM
RE: Shop Sell packet - mrkarlo - 06-21-2014, 09:39 PM
RE: Shop Sell packet - Skul - 06-22-2014 01:37 AM
RE: Shop Sell packet - Skul - 06-22-2014, 02:50 AM
RE: Shop Sell packet - mrkarlo - 06-22-2014, 03:14 AM
RE: Shop Sell packet - Skul - 06-22-2014, 03:16 AM
RE: Shop Sell packet - XuN - 06-23-2014, 04:03 AM
RE: Shop Sell packet - Skul - 06-23-2014, 04:18 AM
RE: Shop Sell packet - Feeh - 06-23-2014, 05:12 AM
RE: Shop Sell packet - Skul - 06-23-2014, 05:28 AM

Forum Jump:


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