You last visited: Today at 01:03
Advertisement
[Courtesy]Create an item with status
Discussion on [Courtesy]Create an item with status within the Rohan forum part of the MMORPGs category.
01/19/2014, 11:21
#1
elite*gold: 0
Join Date: May 2009
Posts: 698
Received Thanks: 250
[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_r ( sqlsrv_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' ); ?>
01/19/2014, 11:44
#2
elite*gold: 0
Join Date: Feb 2011
Posts: 333
Received Thanks: 111
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.
01/19/2014, 12:29
#3
elite*gold: 0
Join Date: May 2009
Posts: 698
Received Thanks: 250
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
01/19/2014, 13:28
#4
elite*gold: 0
Join Date: Jun 2008
Posts: 16
Received Thanks: 7
Thx YoY
01/20/2014, 02:15
#5
elite*gold: 0
Join Date: Jan 2014
Posts: 2
Received Thanks: 0
oziel235 pwd magpatulong sayo?
01/21/2014, 16:14
#6
elite*gold: 0
Join Date: Aug 2013
Posts: 10
Received Thanks: 0
thanks .. this is will usefull for me ^_^
01/21/2014, 16:29
#7
elite*gold: 0
Join Date: May 2009
Posts: 698
Received Thanks: 250
Quote:
Originally Posted by
marianreynald
oziel235 pwd magpatulong sayo?
I do not understand
01/23/2014, 16:14
#8
elite*gold: 23
Join Date: Jun 2013
Posts: 113
Received Thanks: 32
Translate
Quote:
Originally Posted by
oziel235
I do not understand
He said. "Can you help me?"
01/23/2014, 16:22
#9
elite*gold: 0
Join Date: May 2009
Posts: 698
Received Thanks: 250
Quote:
Originally Posted by
marianreynald
oziel235 pwd magpatulong sayo?
I can try to help you.
Add skype: oziel73150
01/23/2014, 18:42
#10
elite*gold: 0
Join Date: May 2013
Posts: 22
Received Thanks: 0
any guide on how to put this on itemmall?
01/24/2014, 15:18
#11
elite*gold: 0
Join Date: Dec 2008
Posts: 10
Received Thanks: 3
where to put this?
02/14/2014, 07:04
#12
elite*gold: 0
Join Date: Dec 2013
Posts: 15
Received Thanks: 0
can you help me too sir oziel ?? i will send you private message here on EPVP TY
05/28/2014, 19:17
#13
elite*gold: 0
Join Date: Jan 2014
Posts: 5
Received Thanks: 0
location scrip place where
05/29/2014, 00:42
#14
elite*gold: 0
Join Date: May 2009
Posts: 698
Received Thanks: 250
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.
07/12/2014, 17:03
#15
elite*gold: 0
Join Date: May 2010
Posts: 37
Received Thanks: 0
how do you convert xls to bin ?
Similar Threads
create item
05/09/2013 - 4Story - 6 Replies
how can i create a new item?
[Very-Simple-Release]How to create Status in 5165!
06/10/2010 - CO2 PServer Guides & Releases - 11 Replies
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 new one... ANYWAYS, this might or might not work depending on the results u get...but it worked for me lol...and plz DON'T spam/flame me...as YES I am still a newbie coder and will keep learning!
Alright so here is how we create more status signs...i.e. "GM" "PM" etc...
go to "Main>GameClient.cs" and find there:
public bool GM;
under it...
How can i create my own item?
03/06/2010 - Metin2 - 4 Replies
Hi can someone tells me how can i create my own item for metin?but tutorial in english pleaseee?
All times are GMT +2. The time now is 01:04 .