How to make portals require an item! (C++) menu

These ads disappear when you log in.

Results 1 to 4 of 4
  1. #1
    sassafrass686's Avatar Sergeant
    Reputation
    8
    Join Date
    Feb 2007
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)

    How to make portals require an item! (C++)

    If you want to teleport somwhere but you want to make it require an item, then you have to do it in c++
    I have used this in the warpNPC code on my sever so one of the warp locations requires an item to use.
    You have to know how to add C++ script in for portals, but thats is easy to learn.
    In that script make the following section of the portal script look like this.
    Code:
    .....................................
                              void OnActivate(Player * pPlayer)
                              {
                                   if(pPlayer->GetItemInterface()->GetItemCount(123456, 1))
                              {
                                   pPlayer->SafeTeleport(1, 0, 1.1111, -21.1111, 817.1224, 0.0000);
                               }
                               }
    ........................................
    Obviously thats not all that you need. Input that into your scripts.
    You need to change the "(123456, 1)" to (itemID, ammount)
    and the numbers after "SafeTeleport" need to be changed in this order
    1: map ID
    0: Zone ID
    1.1111: X
    -21.1111: Y
    817.1234: Z
    0.0000: Orientation

    Thanks for reading and I hope that I helped some of you.
    Sassafrass

    These ads disappear when you log in.

  2. #2
    kate1's Avatar Knight-Champion
    Reputation
    147
    Join Date
    Aug 2007
    Posts
    501
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    nice man, will test this soon +rep

  3. #3
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    very nice been looking for this


  4. #4
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Nice Man.

    +Rep

Similar Threads

  1. Mac T.T/ How to make and add custom item
    By l1i1g1h1t1e1r in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 11-21-2009, 10:05 PM
  2. [Guide] How to make custom vendors and items!
    By Azshaz in forum WoW EMU Guides & Tutorials
    Replies: 11
    Last Post: 07-31-2009, 04:31 PM
  3. How To Make NPC/MOBs drop items
    By The Crazy Kart in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 03-23-2009, 10:25 PM
  4. Quick question on how to make portals.
    By asskandi in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 04-26-2008, 10:53 AM
  5. How to make a magical carpet item
    By killer78 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 12-20-2007, 09:08 PM
All times are GMT -5. The time now is 07:16 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2018 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search