Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: NCP Teleport  (Visto 1658 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Rescate Posteado: September 15, 2019, 09:50:23 PM | Modificado: October 04, 2019, 07:41:46 PM by rescate02

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 503
  • Gracias recibida: 7285
  • ar
Dejo el NCP Teleport  para las source AMZ: http://tuservermu.com.ve/index.php?topic=23395.0
codigo original : http://tuservermu.com.ve/index.php?topic=26411.0

NcpEvento.cpp
Code: [Select]
#include "StdAfx.h"
NCPEVENTO gNpc;


void LoadNcpEvento()
{
gNpc.Switch = GetPrivateProfileIntA("NCPEVENTO","Switch",1,Aminyuz_NcpEvento);
gNpc.NcpID  = GetPrivateProfileIntA("NCPEVENTO","ID",229 ,Aminyuz_NcpEvento);
gNpc.Mapa   = GetPrivateProfileIntA("NCPEVENTO","Mapa",18,Aminyuz_NcpEvento);
gNpc.CoordX = GetPrivateProfileIntA("NCPEVENTO","Coord X",150,Aminyuz_NcpEvento);
gNpc.CoordY = GetPrivateProfileIntA("NCPEVENTO","Coord Y",170, Aminyuz_NcpEvento);
        gNpc.Type    = GetPrivateProfileIntA("NCPEVENTO","Typo",14,Aminyuz_NcpEvento);
gNpc.Index   = GetPrivateProfileIntA("NCPEVENTO", "Index",21,Aminyuz_NcpEvento);
gNpc.Level    = GetPrivateProfileIntA("NCPEVENTO","Level",1,Aminyuz_NcpEvento);
gNpc.ReqCantidad = GetPrivateProfileIntA("NCPEVENTO","Cantidad",1,Aminyuz_NcpEvento);
   }

void CLICKNCPEVENTO(LPOBJ gObj, LPOBJ gObjNPC, int aIndex)
{
if(gNpc.Switch != 0)
{
NCPEVENTOs(gObj, gObjNPC,aIndex);
}
else
{
MsgOutput(aIndex,"[Teleport No estoy de servico, vuelva mas tarde.");
}
}

void NCPEVENTOs(LPOBJ gObj, LPOBJ NpcObj, int aIndex)
{
OBJECTSTRUCT *pObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);
int RENAID = ITEMGET(gNpc.Type,gNpc.Index);
    if(GetInventoryItemCount(gObj->m_Index,RENAID,gNpc.Level) < gNpc.ReqCantidad)
                   
{
MsgOutput(aIndex,"[Teleport]No tienes los items Necesarios");
return;
}
else
{
        gObjDeleteItemsCount(gObj->m_Index,RENAID,gNpc.Level,gNpc.ReqCantidad);
gObjTeleport(aIndex,gNpc.Mapa,gNpc.CoordY,gNpc.CoordX);
MsgOutput(aIndex,"[Teleport]Movido con exito!");
return;
   }
}

NcpEvento.h
Code: [Select]
#ifndef NCPEVENTO_H
#define NCPEVENTO_H

struct NCPEVENTO
{
int Switch;
        int ReqCantidad;
int NcpID;
int Mapa;
int CoordX;
int CoordY;
int Type;
int Index;
int Level;
};
extern NCPEVENTO gNpc;

void LoadNcpEvento();
void CLICKNCPEVENTO(LPOBJ gObj, LPOBJ gObjNPC, int aIndex);
void NCPEVENTOs(LPOBJ gObj, LPOBJ NpcObj, int aIndex);

#endif

StdAfx.h
Code: [Select]
#include "NcpEvento.h"
#define Aminyuz_NcpEvento       "..\\Aminyuz\\NPC\\NcpEvento.ini"

Aminyuz.cpp
Code: [Select]
LoadNcpEvento();

NPCTalkEx.ccp
Code: [Select]
 //====================================
// NPC Evento
//====================================
if (gObjNPC->Class == gNpc.NcpID)
    {
CLICKNCPEVENTO(gObj, gObjNPC,gObj->m_Index);

bResult = true;

Txt en: Aminyuz\NPC\NcpEvento.ini
Code: [Select]
[NcpEvento]

Switch   = 1
ID       = 229
Mapa     = 2
Coord X  = 120
Coord Y  = 120
Typo     = 14
Index    = 21
Level    = 1
Cantidad = 3

Créditos : @bazan





Gracias:


Offline xaxx10 #1 Posteado: September 15, 2019, 10:05:36 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 239
  • Gracias recibida: 6112
  • ar
hermoso aporte, estaria bueno, vere que puedo modificarle, para que pida zen del web bank o rr para llevarte por ejemplo al guild master :D exelente aporte, aunque ya estaba trabajando en algo parecido :D


Offline Rescate #2 Posteado: September 15, 2019, 11:10:21 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 503
  • Gracias recibida: 7285
  • ar
hermoso aporte, estaria bueno, vere que puedo modificarle, para que pida zen del web bank o rr para llevarte por ejemplo al guild master :D exelente aporte, aunque ya estaba trabajando en algo parecido :D
Podes hacer que pida cofres de zen,mas fácil es.
 Si sabes como aplicarle al codigo requisito de nivel al moverse y compartir seria bueno.

Gracias:


Offline xaxx10 #3 Posteado: September 17, 2019, 12:27:10 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 239
  • Gracias recibida: 6112
  • ar
hermoso aporte, estaria bueno, vere que puedo modificarle, para que pida zen del web bank o rr para llevarte por ejemplo al guild master :D exelente aporte, aunque ya estaba trabajando en algo parecido :D
Podes hacer que pida cofres de zen,mas fácil es.
 Si sabes como aplicarle al codigo requisito de nivel al moverse y compartir seria bueno.
Si, ya logre hacer eso, que pida un inventario de cofres de 2billones, vos lograste agregar mobs nuevos, sin sacar ningun otro skin en si del cliente?


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
7 Replies
2526 Views
Last post January 20, 2019, 11:46:23 PM
by MOYOne
1 Replies
1007 Views
Last post November 12, 2017, 02:34:59 PM
by Ryuno
6 Replies
1478 Views
Last post September 19, 2018, 02:03:55 PM
by phcaraujo
35 Replies
6801 Views
Last post March 18, 2022, 05:44:37 PM
by binho
3 Replies
799 Views
Last post February 04, 2020, 02:18:52 PM
by kayito