Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rohan
You last visited: Today at 17:17

  • Please register to post and access all features, it's quick, easy and FREE!

 

[Courtesy]Create an item with status

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2009
Posts: 643
Received Thanks: 201
[Courtesy]Create an item with status

Hi everyone!
Well, below is a predetermined file to create some items, for you are an administrator and you have no idea how to create an item with status, here's help.


Remembering that this is just an example.
You can implement the way you want!

PHP Code:
<?php

function add_item $type,$attr,$inv$slot,$stack,$cid,$uid ){
  global 
$cRohanGame;
  global 
$attr_list;  

  
$sql  "SELECT MAX(id) as id from [RohanGame].[dbo].[TItem]";
  
$res  sqlsrv_query($cRohanGame,$sql);
  
$id   sqlsrv_fetch_array($res,SQLSRV_FETCH_ASSOC);
  
$id   $id['id']+1;
  
  
## putting the costume on their slots
  
if ( $type == 4391040 ){
    
$inv  0   ;
    
$slot 14  // costume
  
} elseif ( $type == 4390972){
    
$inv  0   ;
    
$slot 28  // hat
  
} elseif ( $type == 2754516){
    
$inv  0   ;
    
$slot 7  // eyepatch
  
} elseif ( $type == 2753513){
    
$inv  0   ;
    
$slot 8  // earrings
  
}
  
  
$sql "INSERT INTO [RohanGame].[dbo].[TItem]" .
        
"( id, type, attr, inventory, slot, stack, rank, equip_level, equip_strength, equip_dexterity, equip_intelligence, char_id, user_id)" .
        
" VALUES (".
        
$id.','.
        
$type.','.
        
$attr.','.
        
$inv.','.
        
$slot.','.
        
$stack.','.
        
'0,'// rank
        
'0,'// lvl
        
'0,'// str
        
'0,'// dex
        
'0,'// int
        
$cid.','.
        
$uid.")";
        
//  echo "<pre>".$sql.'</pre>';        
  
$res  sqlsrv_query($cRohanGame,$sql);
  if (
$res == false ){
       
print_rsqlsrv_errors(), true);
  }
}

global 
$attr_list;
$attr_list = array(
  
'none'              =>  '0x4C1100000000000000000000000000000000000000000000000000000000000000000000000000000000',
  
'armors'            =>  '0x1CA0001DA0004C1100309101560500000000000000000000000000000000000000000000000000000000',
  
'rings'             =>  '0x4F08004C1100000000000000000000000000000000000000000000000000000000000000000000000000',
  
'30allstat'         =>  '0x011E00021E00031E00041E00051E00061E001E0F004C1100000000000000000000000000000000000000'
);

global 
$items_list;
$items_list = array(
## ARMORS
###########################################################
/* Glacial Split Tunic                  */  
array( 2688083$attr_list['armors']        , 01),
/* Glacial Split Leggings               */  array( 2688091$attr_list['armors']        , 01),
/* Glacial Split Helm                   */  array( 2688099$attr_list['armors']        , 01),
/* Glacial Split Gauntlet               */  array( 2688107$attr_list['armors']        , 01),
/* Glacial Split Boots                  */  array( 2688115$attr_list['armors']        , 01),
/* Glacial Split Shield                 */  array( 3671322$attr_list['armors']        , 01),

## RINGS
###########################################################
/* Artisan Spinel                       */  
array( 2762559$attr_list['rings']         , 01),
/* Artisan Spinel                       */  array( 2762559$attr_list['rings']         , 01),
/* Artisan Spinel                       */  array( 2762559$attr_list['rings']         , 01),
/* Artisan Spinel                       */  array( 2762559$attr_list['rings']         , 01),

/* Artisan Aquamarine                   */  array( 2762560$attr_list['rings']         , 01),
/* Artisan Aquamarine                   */  array( 2762560$attr_list['rings']         , 01),
/* Artisan Aquamarine                   */  array( 2762560$attr_list['rings']         , 01),
/* Artisan Aquamarine                   */  array( 2762560$attr_list['rings']         , 01),

/* Artisan Topaz Brooch                 */  array( 2762561$attr_list['rings']         , 01),
/* Artisan Topaz Brooch                 */  array( 2762561$attr_list['rings']         , 01),
/* Artisan Topaz Brooch                 */  array( 2762561$attr_list['rings']         , 01),
/* Artisan Topaz Brooch                 */  array( 2762561$attr_list['rings']         , 01),

/* Artisan Green Mano                   */  array( 2762558$attr_list['rings']         , 01),
/* Artisan Green Mano                   */  array( 2762558$attr_list['rings']         , 01),
/* Artisan Green Mano                   */  array( 2762558$attr_list['rings']         , 01),
/* Artisan Green Mano                   */  array( 2762558$attr_list['rings']         , 01),

/* Flame Diamonds                       */  array( 2753056$attr_list['none']          , 01),
/* Flame Diamonds                       */  array( 2753056$attr_list['none']          , 01),
/* Flame Diamonds                       */  array( 2753056$attr_list['none']          , 01),
/* Flame Diamonds                       */  array( 2753056$attr_list['none']          , 01),

## SCROLSS
###########################################################
/* Gradiator Liesence(Highest grade)    */  
array(4718623'0x00'                       25),
/* Ranger Liesence(Highest grade)       */  array(4718626'0x00'                       25),
/* Mage Liesence(Highest grade)         */  array(4718629'0x00'                       25),
/* Physical Blow Scroll(Highest grade)  */  array(4718691'0x00'                       25),
/* Sacred Heart's Blessing              */  array(4722672'0x00'                       25),
/* Purified Physical Def                */  array(4718670'0x00'                       25),

## SES & RAES (100%)
###########################################################
/* SES 100%                             */ 
array(2884583,  "0x00"                       30),
/* RAES 100%                            */ array(2884586,  "0x00"                       30),
//
## Costumes
###########################################################
/* Ignited Spirit Armor                 */ 
array(4391040$attr_list['none']            , 01),
/* Santa's Hat                          */ array(4390972$attr_list['30allstat']       , 01),
/* Monocle of Solemnity                 */ array(2754516$attr_list['30allstat']       , 01),
/* Cold Gaze Earrings                   */ array(2753513$attr_list['30allstat']       , 01),
//
## PETS & POTS
###########################################################
/* Soft Kahto                           */ 
array(4063233'0x00'                       01),
/* Bear                                 */ array(4063234'0x00'                       01),
/* Brave Dragon                         */ array(4063237'0x00'                       01),
/* Speedy Hawk                          */ array(4063238'0x00'                       01),
/* Power Tiger                          */ array(4063239'0x00'                       01),
/* Molly                                */ array(4063282'0x00'                       01),
//
/* PET FOOD                             */ 
array(2937591'0x00'                       25),
/* Incomprehensible Growth Feed         */ array(2886001'0x00'                       25),

/* HP POT                               */ array(2818067'0x00'                       ,25),
/* HP POT                               */ array(2818067'0x00'                       ,25),
/* HP POT                               */ array(2818067'0x00'                       ,25),
/* HP POT                               */ array(2818067'0x00'                       ,25),

/* MP POT                               */ array(2818071'0x00'                       ,25),
/* MP POT                               */ array(2818071'0x00'                       ,25),
/* MP POT                               */ array(2818071'0x00'                       ,25),
/* MP POT                               */ array(2818071'0x00'                       ,25),
//
/* Elixir                               */ 
array(2818076'0x00'                       ,25),
/* Elixir                               */ array(2818076'0x00'                       ,25),
/* Elixir                               */ array(2818076'0x00'                       ,25),
/* Elixir                               */ array(2818076'0x00'                       ,25),
//
## TIght Sealed bag 2933685
// bag slots inv 0 slot 16 17 18
);

global 
$weapons_list;
$weapons_list = array(
  
'Glacial Split Dagger'      =>  2621497,
  
'Glacial Split Sword'       =>  2621598,
  
'Glacial Split Dual Sword'  =>  2621700,
  
'Glacial Split Zhen'        =>  2622721,
  
'Glacial Split Katar'       =>  2622498,
  
'Glacial Split Polearm'     =>  2621998,
  
'Glacial Split Staff'       =>  2622198,
  
'Glacial Split Bow'         =>  2622299,
  
'Glacial Split Crossbow'    =>  2622397,
  
'Glacial Split Club'        =>  2621798,
  
'Glacial Split Axe'         =>  2621898,
);

global 
$weapons_attr;
$weapons_attr = array(
  
'100Str 67Melee 33Health 50DD'          =>  '0x0164001721001A4300223200550D004C1100000000000000000000000000000000000000000000000000',
  
'100Str 67Melee 33Health 15Crit'        =>  '0x0164000D0F001721001A4300550D004C1100000000000000000000000000000000000000000000000000',
  
'100Str 67Melee 33Health 35WA'          =>  '0x0164000723001721001A4300550D004C1100000000000000000000000000000000000000000000000000',
  
'100Str 67Melee 33Health 35AttSpeed'    =>  '0x0164000C23001721001A4300550D004C1100000000000000000000000000000000000000000000000000',
  
  
'100Psy 50Vit 67Health 50DD'            =>  '0x046400053200174300223200550D004C1100000000000000000000000000000000000000000000000000',
  
'100Vit 50Psy 67Health 50DD'            =>  '0x043200056400174300223200550D004C1100000000000000000000000000000000000000000000000000',    

  
'100Vit 50Psy 67Health 20Reflect'       =>  '0x043200056400174300281400550D004C1100000000000000000000000000000000000000000000000000',
  
  
'200Agi 33Health 15Crit'                =>  '0x06C8000D0F00172100000000550D004C1100000000000000000000000000000000000000000000000000',
  
'200Agi 33Health 70Elemental'           =>  '0x06C800172100254600000000550D004C1100000000000000000000000000000000000000000000000000',
  
'200Dex 33Health 15Crit'                =>  '0x02C8000D0F00172100000000550D004C1100000000000000000000000000000000000000000000000000',
  
  
'100Int 67Melee 33Magic 50DD'           =>  '0x0364001921001A4300223200550D004C1100000000000000000000000000000000000000000000000000',   
  
'100Int 67Melee 33Magic 35AttSpeed'     =>  '0x0364000C23001921001A4300550D004C1100000000000000000000000000000000000000000000000000',
  
  
'100Dex 67Ranged 33Health 50DD'         =>  '0x0264001721001B4300223200550D004C1100236400000000000000000000000000000000000000000000',  
  
'100Dex 67Ranged 33Health 15Crit'       =>  '0x0264000D0F001721001B4300550D004C1100236400000000000000000000000000000000000000000000',  
  
'100Dex 67Ranged 33Health 35WA'         =>  '0x0264000723001721001B4300550D004C1100236400000000000000000000000000000000000000000000',  
  
'100Dex 67Ranged 33Health 35AttSpeed'   =>  '0x0264000C23001721001B4300550D004C1100236400000000000000000000000000000000000000000000',

  
'100Int 67Magic 33Health 50DD'          =>  '0x036400172100194300223200550D004C1100000000000000000000000000000000000000000000000000',
  
'200Vit 33Health 35Mobility'            =>  '0x05C8000B2300172100000000550D004C1100000000000000000000000000000000000000000000000000',
  
'100Vit 67Health 3Mobility'             =>  '0x0564000B2300174300000000550D004C1100000000000000000000000000000000000000000000000000',
  
'100Vit 67Health 33Ranged 50DD'         =>  '0x0564001743001B2100223200550D004C1100000000000000000000000000000000000000000000000000'
);
?>



oziel235 is offline  
Thanks
1 User
Old   #2
 
elite*gold: 0
Join Date: Feb 2011
Posts: 333
Received Thanks: 107
That's the script to add items i made on the first server i worked at.
Unfortunately, inserting items directly into TItem is not the way to do things, because the mapserver would "steal" items from another player in order to give you those items.

You're better inserting them to TEventItems or Item Mall.

It bugs me that some server use ancient scripts in order to run their server.


zzerachiel is offline  
Old   #3
 
elite*gold: 0
Join Date: May 2009
Posts: 643
Received Thanks: 201
because it is neither tested got it but didn't have time. Posted only to help people who have no idea of how to make an item with status.


I changed some statements doing that instead you use an item, it creates a new item and adds the status and now worked perfectly.
Didn't use any one item
oziel235 is offline  
Old   #4
 
elite*gold: 0
Join Date: Jun 2008
Posts: 15
Received Thanks: 7
Thx YoY


jarrod512 is offline  
Old   #5
 
elite*gold: 0
Join Date: Jan 2014
Posts: 2
Received Thanks: 0
oziel235 pwd magpatulong sayo?
marianreynald is offline  
Old   #6
 
elite*gold: 0
Join Date: Aug 2013
Posts: 10
Received Thanks: 0
thanks .. this is will usefull for me ^_^
bringmethehorizon12 is offline  
Old   #7
 
elite*gold: 0
Join Date: May 2009
Posts: 643
Received Thanks: 201
Quote:
Originally Posted by marianreynald View Post
oziel235 pwd magpatulong sayo?
I do not understand
oziel235 is offline  
Old   #8
 
elite*gold: 0
Join Date: Jun 2013
Posts: 102
Received Thanks: 24
Translate

Quote:
Originally Posted by oziel235 View Post
I do not understand
He said. "Can you help me?"
DevParanoid is offline  
Thanks
1 User
Old   #9
 
elite*gold: 0
Join Date: May 2009
Posts: 643
Received Thanks: 201
Quote:
Originally Posted by marianreynald View Post
oziel235 pwd magpatulong sayo?
I can try to help you.
Add skype: oziel73150
oziel235 is offline  
Old   #10
 
elite*gold: 0
Join Date: May 2013
Posts: 22
Received Thanks: 0
any guide on how to put this on itemmall?
rohanprivateteam is offline  
Old   #11
 
elite*gold: 0
Join Date: Dec 2008
Posts: 10
Received Thanks: 3
where to put this?
christianzlife is offline  
Old   #12
 
elite*gold: 0
Join Date: Dec 2013
Posts: 14
Received Thanks: 0
can you help me too sir oziel ?? i will send you private message here on EPVP TY
saszuke25 is offline  
Old   #13
 
elite*gold: 0
Join Date: Jan 2014
Posts: 5
Received Thanks: 0
location scrip place where
aisman is offline  
Old   #14
 
elite*gold: 0
Join Date: May 2009
Posts: 643
Received Thanks: 201
Guys... this script you adapt it on its website. It's just a hint of how to create items for the website, can adapt it in your shop. It is an idea, the way how to apply is with you.
oziel235 is offline  
Old   #15
 
elite*gold: 0
Join Date: May 2010
Posts: 34
Received Thanks: 0
how do you convert xls to bin ?


jamesyap00 is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
create item
how can i create a new item?
6 Replies - 4Story
[Very-Simple-Release]How to create Status in 5165!
Ok so this might be a basic release lol but someday I decided to fiddle around wit da server since ma internet was down and I'm currently getting a...
11 Replies - CO2 PServer Guides & Releases
How can i create my own item?
Hi can someone tells me how can i create my own item for metin?but tutorial in english pleaseee?
4 Replies - Metin2 Main - Discussions / Questions



All times are GMT +2. The time now is 17:17.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.