ArcEmu: 3d Character Viewer - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

3d Character Viewer Need help

#1 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 22 March 2010 - 11:39 PM

I've found a partially working code for a 3D armory, problem is its for Trinity and maybe Mangos.

I was wondering if anyone could help me convert it to ArcEmu so we could all take advantage of it.

<center><form name="pepe" action="<?=$PHP_SELF?>" method=POST>
<input type=text name="Nnombre">
<input type=submit name="button" value="Submit">
 </form></center>

<?php

$config['ip'] = "******";
$config['user'] = "*****";
$config['pass'] = "*****";
$config['char_db'] = "*****";
$config['world_db'] = "*****";
$config['player_guid'] = $_POST["Nnombre"];

mysql_connect($config['ip'], $config['user'], $config['pass']);
mysql_select_db($config['char_db']);

$sql = mysql_query("SELECT guid, race, gender FROM characters WHERE name = '".mysql_real_escape_string($config['player_guid'])."'");
$result = mysql_fetch_array($sql);


$sql2 = mysql_query("SELECT slot FROM playeritems WHERE ownerguid = '".$result['guid']."'");
$result2 = mysql_fetch_array($sql2);


$slot = explode(' ', $result2['slot']);

$item_head = $slot[0];
$item_neck = $slot[1];
$item_shoulder = $slot[2];
$item_shirt = $slot[3];
$item_chest = $slot[4];
$item_belt = $slot[5];
$item_legs = $slot[6];
$item_feet = $slot[7];
$item_wrist = $slot[8];
$item_gloves = $slot[9];
$item_finger1 = $slot[10];
$item_finger2 = $slot[11];
$item_trinket1 = $slot[12];
$item_trinket2 = $slot[13];
$item_back = $slot[14];
$item_main_hand = $slot[15];
$item_off_hand = $slot[16];
$item_ranged_slot = $slot[17];

function wowhead_did($item) {
    global $config; //Need to get the config data array
    mysql_select_db($config['world_db']);
    $sql = mysql_query("SELECT `displayid` FROM items WHERE entry = '" . $item . "' LIMIT 1");
    $displayid = mysql_result(displayid);

    echo $displayid;

}

function char_racegender($race, $gender) {

    $char_race = array(
        1 => 'human',
        2 => 'orc',
        3 => 'dwarf',
        4 => 'nightelf',
        5 => 'scourge',
        6 => 'tauren',
        7 => 'gnome',
        8 => 'troll',
        10 => 'bloodelf',
        11 => 'draenei');

    $char_gender = array(
        0 => 'male',
        1 => 'female');

    echo $char_race[$race].$char_gender[$gender];

}

mysql_free_result($result);
mysql_free_result($result2);
?>


<object data="http://static.wowhead.com/modelviewer/ModelView.swf" width="290px" height="400px" type="application/x-shockwave-flash">
  <param value="high" name="quality" />
  <param value="transparent" name="wmode" />
  <param value="always" name="allowsscriptaccess" />
  <param value="false" name="menu" />
<param name="flashvars" value="model=<?php char_racegender($result['race'], $result['gender']); ?>&amp;modelType=16&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1&amp;equipList=1,<?php wowhead_did($item_head); ?>" />
<param movie="http://static.wowhead.com/modelviewer/modelviewer_scale.swf?4" />
</object>
</div>



The main problem is that I think I'm missing some files needed for this to work..
0

#2 User is offline   Elliott Quick 

  • Member
  • Pip
  • Group: Members
  • Posts: 53
  • Joined: 17-May 09
  • Gender:Male
  • Location:Grand Rapids, MI
  • Server OS:Windows

Posted 23 March 2010 - 08:05 AM

View Postfriskey4u, on 22 March 2010 - 11:39 PM, said:

I've found a partially working code for a 3D armory, problem is its for Trinity and maybe Mangos.

I was wondering if anyone could help me convert it to ArcEmu so we could all take advantage of it.

<center><form name="pepe" action="<?=$PHP_SELF?>" method=POST>
<input type=text name="Nnombre">
<input type=submit name="button" value="Submit">
 </form></center>

<?php

$config['ip'] = "******";
$config['user'] = "*****";
$config['pass'] = "*****";
$config['char_db'] = "*****";
$config['world_db'] = "*****";
$config['player_guid'] = $_POST["Nnombre"];

mysql_connect($config['ip'], $config['user'], $config['pass']);
mysql_select_db($config['char_db']);

$sql = mysql_query("SELECT guid, race, gender FROM characters WHERE name = '".mysql_real_escape_string($config['player_guid'])."'");
$result = mysql_fetch_array($sql);


$sql2 = mysql_query("SELECT slot FROM playeritems WHERE ownerguid = '".$result['guid']."'");
$result2 = mysql_fetch_array($sql2);


$slot = explode(' ', $result2['slot']);

$item_head = $slot[0];
$item_neck = $slot[1];
$item_shoulder = $slot[2];
$item_shirt = $slot[3];
$item_chest = $slot[4];
$item_belt = $slot[5];
$item_legs = $slot[6];
$item_feet = $slot[7];
$item_wrist = $slot[8];
$item_gloves = $slot[9];
$item_finger1 = $slot[10];
$item_finger2 = $slot[11];
$item_trinket1 = $slot[12];
$item_trinket2 = $slot[13];
$item_back = $slot[14];
$item_main_hand = $slot[15];
$item_off_hand = $slot[16];
$item_ranged_slot = $slot[17];

function wowhead_did($item) {
    global $config; //Need to get the config data array
    mysql_select_db($config['world_db']);
    $sql = mysql_query("SELECT `displayid` FROM items WHERE entry = '" . $item . "' LIMIT 1");
    $displayid = mysql_result(displayid);

    echo $displayid;

}

function char_racegender($race, $gender) {

    $char_race = array(
        1 => 'human',
        2 => 'orc',
        3 => 'dwarf',
        4 => 'nightelf',
        5 => 'scourge',
        6 => 'tauren',
        7 => 'gnome',
        8 => 'troll',
        10 => 'bloodelf',
        11 => 'draenei');

    $char_gender = array(
        0 => 'male',
        1 => 'female');

    echo $char_race[$race].$char_gender[$gender];

}

mysql_free_result($result);
mysql_free_result($result2);
?>


<object data="http://static.wowhead.com/modelviewer/ModelView.swf" width="290px" height="400px" type="application/x-shockwave-flash">
  <param value="high" name="quality" />
  <param value="transparent" name="wmode" />
  <param value="always" name="allowsscriptaccess" />
  <param value="false" name="menu" />
<param name="flashvars" value="model=<?php char_racegender($result['race'], $result['gender']); ?>&amp;modelType=16&amp;contentPath=http://static.wowhead.com/modelviewer/&amp;blur=1&amp;equipList=1,<?php wowhead_did($item_head); ?>" />
<param movie="http://static.wowhead.com/modelviewer/modelviewer_scale.swf?4" />
</object>
</div>



The main problem is that I think I'm missing some files needed for this to work..


I'll give her a go, upload a zipped folder with the files.
1

#3 User is offline   this_is_junk 

  • Retired Retard
  • Group: Contributor
  • Posts: 2,432
  • Joined: 08-October 08
  • Gender:Male
  • Location:Washington State

Posted 23 March 2010 - 10:38 AM

I've already translated this to work with ArcEmu, it comes with ArcManager.
GAH!!! >_< ...can't...just...stop...working...
0

#4 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 23 March 2010 - 03:23 PM

Yeah, i found that last night, but it doesn't work for me.
Plus I can't find any way to strip down your code, even if I did get it working, to implement it into a separate website.
0

#5 User is offline   this_is_junk 

  • Retired Retard
  • Group: Contributor
  • Posts: 2,432
  • Joined: 08-October 08
  • Gender:Male
  • Location:Washington State

Posted 23 March 2010 - 07:36 PM

View Postfriskey4u, on 23 March 2010 - 03:23 PM, said:

Yeah, i found that last night, but it doesn't work for me.
Plus I can't find any way to strip down your code, even if I did get it working, to implement it into a separate website.


Mostly it's just the same one you had, (though improved to show more equipped items and the character's looks) the $data[] array is the exploded contents of the characters data field. The file libs/data_lib.php has all the offsets as defines.

The lines you'll want in char_view.php are 87-115, (load equips & looks into variables) 154-210, (improved display) and the two functions in 31-60. $output is simply storage for the html output of the php code and is echoed later. (a technique I recommend using as it allows you to do further processing of the html output before it goes to the client)

This post has been edited by this_is_junk: 23 March 2010 - 07:36 PM

GAH!!! >_< ...can't...just...stop...working...
0

#6 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 23 March 2010 - 09:07 PM

I'll look into when I get home, whats the SVN for ArcManager?
0

#7 User is offline   this_is_junk 

  • Retired Retard
  • Group: Contributor
  • Posts: 2,432
  • Joined: 08-October 08
  • Gender:Male
  • Location:Washington State

Posted 23 March 2010 - 09:27 PM

http://svn6.assembla.../svn/arcmanager

This post has been edited by this_is_junk: 23 March 2010 - 09:28 PM

GAH!!! >_< ...can't...just...stop...working...
0

#8 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 23 March 2010 - 10:49 PM

Is there a user friendly guide to install it?


Never mind, just found the installation.txt in the docs folder.

silly me.
0

#9 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 24 March 2010 - 12:25 AM

It still doesn't display the characters with their armor.

Its definitely 3D but there's not armor.


I honestly have no idea why it doesn't work for me, but does it have something to do with...


    $data = explode(';',$char['data']);

    $item_head = $data[PLAYER_VISIBLE_ITEM_1_ENTRYID];
    $item_neck = $data[PLAYER_VISIBLE_ITEM_2_ENTRYID];
    $item_shoulder = $data[PLAYER_VISIBLE_ITEM_3_ENTRYID];
    $item_shirt = $data[PLAYER_VISIBLE_ITEM_4_ENTRYID];
    $item_chest = $data[PLAYER_VISIBLE_ITEM_5_ENTRYID];
    $item_belt = $data[PLAYER_VISIBLE_ITEM_6_ENTRYID];
    $item_legs = $data[PLAYER_VISIBLE_ITEM_7_ENTRYID];
    $item_feet = $data[PLAYER_VISIBLE_ITEM_8_ENTRYID];
    $item_wrist = $data[PLAYER_VISIBLE_ITEM_9_ENTRYID];
    $item_gloves = $data[PLAYER_VISIBLE_ITEM_10_ENTRYID];
    $item_finger1 = $data[PLAYER_VISIBLE_ITEM_11_ENTRYID];
    $item_finger2 = $data[PLAYER_VISIBLE_ITEM_12_ENTRYID];
    $item_trinket1 = $data[PLAYER_VISIBLE_ITEM_13_ENTRYID];
    $item_trinket2 = $data[PLAYER_VISIBLE_ITEM_14_ENTRYID];
    $item_back = $data[PLAYER_VISIBLE_ITEM_15_ENTRYID];
    $item_main_hand = $data[PLAYER_VISIBLE_ITEM_16_ENTRYID];
    $item_off_hand = $data[PLAYER_VISIBLE_ITEM_17_ENTRYID];
    $item_ranged_slot = $data[PLAYER_VISIBLE_ITEM_18_ENTRYID];
    $item_tabard = $data[PLAYER_VISIBLE_ITEM_19_ENTRYID];



Maybe they've changed the ItemInterface.cpp
0

#10 User is offline   Dzjhenghiz 

  • حشّاشين
  • Group: Contributor
  • Posts: 1,936
  • Joined: 07-June 08
  • Gender:Male
  • Location:2nd stone after the 3rd oase western sahara
  • Interests:M.C.S.E :- Minesweeper Consultant & Solitaire Expert
  • Server OS:Other

Posted 24 March 2010 - 03:54 AM

well it definatly works FINE, in arcmanager that is. xD

Posted Image
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#11 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 24 March 2010 - 04:45 AM

Posted Image
0

#12 User is offline   Dzjhenghiz 

  • حشّاشين
  • Group: Contributor
  • Posts: 1,936
  • Joined: 07-June 08
  • Gender:Male
  • Location:2nd stone after the 3rd oase western sahara
  • Interests:M.C.S.E :- Minesweeper Consultant & Solitaire Expert
  • Server OS:Other

Posted 24 March 2010 - 05:22 AM

Well thats the character page, so i think u missed to extract the icons xD ?, also make sure the dbcs are in the manager,


Quote

8. Run the included DBC to MySQL Convertor tool. Instructions are in \Tools\README (DBC to MySQL).txt
(This must be run from Windows XP or greater, but the destination database may be hosted on *Nix)

9. Extract \img\icons\icons.zip into ArcManager\img\icons\.
10. Extract any .zip files in \img\icons\updates\


I think you also did not enable the :

SaveExtendedCharData="1"> in world.conf since it aint showing HP etc. which this field will provide xD

Posted Image

This post has been edited by Dzjhenghiz: 24 March 2010 - 05:33 AM

Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#13 User is offline   this_is_junk 

  • Retired Retard
  • Group: Contributor
  • Posts: 2,432
  • Joined: 08-October 08
  • Gender:Male
  • Location:Washington State

Posted 24 March 2010 - 10:11 AM

View Postfriskey4u, on 24 March 2010 - 12:25 AM, said:

It still doesn't display the characters with their armor.

Its definitely 3D but there's not armor.


I honestly have no idea why it doesn't work for me, but does it have something to do with...


    $data = explode(';',$char['data']);

    $item_head = $data[PLAYER_VISIBLE_ITEM_1_ENTRYID];
    $item_neck = $data[PLAYER_VISIBLE_ITEM_2_ENTRYID];
    $item_shoulder = $data[PLAYER_VISIBLE_ITEM_3_ENTRYID];
    $item_shirt = $data[PLAYER_VISIBLE_ITEM_4_ENTRYID];
    $item_chest = $data[PLAYER_VISIBLE_ITEM_5_ENTRYID];
    $item_belt = $data[PLAYER_VISIBLE_ITEM_6_ENTRYID];
    $item_legs = $data[PLAYER_VISIBLE_ITEM_7_ENTRYID];
    $item_feet = $data[PLAYER_VISIBLE_ITEM_8_ENTRYID];
    $item_wrist = $data[PLAYER_VISIBLE_ITEM_9_ENTRYID];
    $item_gloves = $data[PLAYER_VISIBLE_ITEM_10_ENTRYID];
    $item_finger1 = $data[PLAYER_VISIBLE_ITEM_11_ENTRYID];
    $item_finger2 = $data[PLAYER_VISIBLE_ITEM_12_ENTRYID];
    $item_trinket1 = $data[PLAYER_VISIBLE_ITEM_13_ENTRYID];
    $item_trinket2 = $data[PLAYER_VISIBLE_ITEM_14_ENTRYID];
    $item_back = $data[PLAYER_VISIBLE_ITEM_15_ENTRYID];
    $item_main_hand = $data[PLAYER_VISIBLE_ITEM_16_ENTRYID];
    $item_off_hand = $data[PLAYER_VISIBLE_ITEM_17_ENTRYID];
    $item_ranged_slot = $data[PLAYER_VISIBLE_ITEM_18_ENTRYID];
    $item_tabard = $data[PLAYER_VISIBLE_ITEM_19_ENTRYID];



Maybe they've changed the ItemInterface.cpp


Did you remember to borrow and include or require the data_lib.php file? Without it all those offsets are just going to be zero.
GAH!!! >_< ...can't...just...stop...working...
0

#14 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 24 March 2010 - 10:07 PM

View PostDzjhenghiz, on 24 March 2010 - 05:22 AM, said:

Well thats the character page, so i think u missed to extract the icons xD ?, also make sure the dbcs are in the manager,




I think you also did not enable the :

SaveExtendedCharData="1"> in world.conf since it aint showing HP etc. which this field will provide xD

Posted Image

I did everything you said, still nothing.

View Postthis_is_junk, on 24 March 2010 - 10:11 AM, said:

Did you remember to borrow and include or require the data_lib.php file? Without it all those offsets are just going to be zero.


No idea what you're talking about..
0

#15 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 25 March 2010 - 12:11 AM

I'm not trying to strip ArcManager down to work for my site anymore, I'm just trying to get it to work on its own.

And I can't seem to get it to work at all.
0

#16 User is offline   Dzjhenghiz 

  • حشّاشين
  • Group: Contributor
  • Posts: 1,936
  • Joined: 07-June 08
  • Gender:Male
  • Location:2nd stone after the 3rd oase western sahara
  • Interests:M.C.S.E :- Minesweeper Consultant & Solitaire Expert
  • Server OS:Other

Posted 25 March 2010 - 03:36 AM

Well IF you logged the character in it SHOULD display the HP etc. in the manager, if it is NOT Showing that, i suppose theres something wrong with your installation then,

BTW did you also EXTRACT the DBCs to MYSQL ? en loaded that in the manager Dbase ?


Quote

8. Run the included DBC to MySQL Convertor tool. Instructions are in \Tools\README (DBC to MySQL).txt
(This must be run from Windows XP or greater, but the destination database may be hosted on *Nix)



Since there is where the manager gets his info about display ids of gear etc.

without PROPER information from your side we can not magically discover WHERE it goes wrong, i just installed it @ another realm and without issues.
Need Help With Arcemu ? ^^
Posted Image
Concordia res parvae crescunt In varietate concordia
Spoiler

0

#17 User is offline   friskey4u 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 310
  • Joined: 19-December 08
  • Gender:Male
  • Location:U.S.A
  • Interests:Music

    Skip school, fly kites.

Posted 26 March 2010 - 12:18 AM

Yeah I did that..
I'm going to delete everything and start over again tonight.
I'll let you know if I face any problems.



Also, don't treat me like an idiot. I'm not a professional in PHP, but I know my way around.

----


ill start fresh with the svn you gave me..

----

Created a Database for "arcmanager"
Created a new database for "arcmanagerconfig"
Import from the highest numbered *_arcmanager.sql in SQL into "arcmanager"
Import from the highest numbered *_arcmanager_config.sql in SQL into "arcmanagerconfig"
There were no updates that needed to be installed from either.
Run the included DBC to MySQL Convertor tool, it put all the information into the "arcmanager" database correctly.
I Extracted \img\icons\icons.zip into ArcManager\img\icons\.
I copied \scripts\config.dist.php into \scripts\ as config.php.
I configured all the entries in the config.php
I configure all the entries for setup.php

"Open {URL to your server}/setup.php in your browser.
Enter the values indicated.
Click "Save Changes"."
-Did that




I did everything..
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users