Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Development] Self Design / Original Design

Newbie Spellweaver
Joined
Nov 8, 2009
Messages
16
Reaction score
9
Hello

I'm trying to run this system in php.

The game sends to the address in projectg ( ) some info:

$ _POST values:
'ucctype => clothes
userid => usertest
type => 1
item_id => 792
key => 0

$ _FILES values:
uccfile => Array
name => m_pv_u01f01_d5e2908d.jpg
type => image / jpeg
tmp_name => C: \ WINDOWS \ Temp \ php31.tmp
error => 0
size => 24217

So we can send the image to the server. But I still need to know if something is returned or recorded in the database.

URLs for testing Pangya TH:





change these links in your projectG.exe

Exe:

Can someone help me develop it?

Code upload.php

Code:
<?php


$file = isset($_FILES["uccfile"]) ? $_FILES["uccfile"] : FALSE;

if($file){  

        preg_match("/\.(gif|bmp|png|jpg|jpeg){1}$/i", $file["name"], $ext);
        $image_name = $file['name'];
        $image_dir = "ucc/" . $image_name;
        move_uploaded_file($file["tmp_name"], $image_dir);

}
?>

ty
 
Last edited:
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
I was planning to look into this as well.

The good thing: If UCC gets rolling, Ghost uploads should be trivial too.

Did you actually manage to force the client to talk to your webserver? At least on my setup I constantly get code 2 responses, indicating that it's still ini3's server answering - despite changing the address.
 
Newbie Spellweaver
Joined
Nov 8, 2009
Messages
16
Reaction score
9
I was planning to look into this as well.

The good thing: If UCC gets rolling, Ghost uploads should be trivial too.

Did you actually manage to force the client to talk to your webserver? At least on my setup I constantly get code 2 responses, indicating that it's still ini3's server answering - despite changing the address.

Yes, I get the answer.

the image is sends, but it is impossible to be edited.
 
Creator of Code
Joined
Mar 5, 2006
Messages
371
Reaction score
131
I was planning to look into this as well.

The good thing: If UCC gets rolling, Ghost uploads should be trivial too.

Did you actually manage to force the client to talk to your webserver? At least on my setup I constantly get code 2 responses, indicating that it's still ini3's server answering - despite changing the address.

To fix this you need to insert this into TA_SECURITY_TYPE_ACC:
Type: 1
Type_NM: Something
USE_YN: Y
IN_DATE: some date

After that it starts talking to the server specified.
 
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
Thanks for the pointer, chreadie.

I'm fully able to save and use designs now, unfortunately it seems I still cannot unequip the item (this might be due to the fact that PART_ACC is still empty and I've overridden the procedure for UCC_LOAD to make it work), temporary saves do not get carried over to different sessions and the UCC-specific icon doesn't show up yet.

If anyone else has been working on those ends, I'd be glad for a few pointers; I don't need the details, just the gist of it.

The backend component is pretty much done (gotta fix some small problems with the verification and reset of security keys). I doubt I'll have to work on it much longer for a first preview, so I'll probably post a test version here as soon as I've fixed the issues mentioned before.

Obligatory screenshot attached.
 
Last edited:
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
Could you be more specific? I'm afraid I don't understand what part you currently refer to.
 
Last edited:
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
The promised test version (for developers and hack-savvy people only, kinda buggy and not fixed) for those interested.

Edit 2011-03-04: I deleted the links because a growing number of people seems to mistake the linked test version for something production-ready. This is not the case. The code I linked here was provided without any support.

If you have a legit reason for wanting these files, please PM me.
 
Last edited:
Creator of Code
Joined
Mar 5, 2006
Messages
371
Reaction score
131
Do you just print that on the page or send it in the headers?

EDIT: nvm i saw how you did it in your file

Thanks and great work!
 
Last edited:
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
I just print it, Pangya doesn't seem to do any magic with headers.
You can give the files I linked to in my previous post a go.
 
Creator of Code
Joined
Mar 5, 2006
Messages
371
Reaction score
131
if i add the output to the script i have, it does what yours does.

But i cant get it to accept that the file has been uploaded, i get the file and its places where it should and echo "PANGYA_UPDATE_OK" and still error 10.
 
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
Error 10 is basically the catchall error for "I got some output I don't understand".

Make sure you turn off error_reporting in your script and use a log file to grab PHP messages instead.

You could just build on the foundation of what I've already posted (that's why I posted the stuff here).

*Edit: Here's my ucc_debug.php, it might be useful to find errors in your implementation...
Code:
<?php
function getDebugData() {
	global $_POST, $_GET;
	
	// Make sure we get our share of debug output...
	error_reporting(E_ALL);
	ini_set('display_errors','Off');
	ini_set('error_log','debug_php_msgs.txt');
	
	// Grab and export $_POST
	$_debugLogPost = "debug_post.xml";
	$_dbgPost = fopen($_debugLogPost, 'w') or die("can't open POST debug log");
	fwrite($_dbgPost, print_r_xml($_POST));
	fclose($_dbgPost);
	
	// Grab and export $_GET
	$_debugLogGet = "debug_get.xml";
	$_dbgGet = fopen($_debugLogGet, 'w') or die("can't open GET debug log");
	fwrite($_dbgGet, print_r_xml($_GET));
	fclose($_dbgGet);
}

/* print the contents of a url */
function print_r_xml($arr,$wrapper = 'data',$cycle = 1)
{
  //useful vars
  $new_line = "\n";

  //start building content
  if($cycle == 1) { $output = '<?xml version="1.0" encoding="UTF-8" ?>'.$new_line; }
  $output .= tabify($cycle - 1).'<'.$wrapper.'>'.$new_line;
  foreach($arr as $key => $val)
  {
    if(!is_array($val))
    {
      $output .= tabify($cycle).'<'.htmlspecialchars($key).'>'.$val.'</'.htmlspecialchars($key).'>'.$new_line;
    }
    else
    {
      $output .= print_r_xml($val,$key,$cycle + 1).$new_line;
    }
  }
  $output .= tabify($cycle - 1).'</'.$wrapper.'>';

  //return the value
  return $output;
}

/* tabify */
function tabify($num_tabs)
{
  $return = "";
  for($x = 1; $x <= $num_tabs; $x++) { $return .= "\t"; }
  return $return;
}
?>
 
Last edited:
Creator of Code
Joined
Mar 5, 2006
Messages
371
Reaction score
131
So i tried this out a bit with your script Tsukasa and i found that in the key check function you have 'N', i had to change this to 'Y' to get any other output then 15 (ERR_SRVVAR).

Havent had time to check other stuff and now ill take some time to actually play :D
 
Deny everything.
Joined
Jun 17, 2005
Messages
488
Reaction score
110
Yeah that somehow slipped by... good way to keep people away who want to use this in production though...

Still don't know where temp designs derail and why finalized designs get itchy when you try to unequip them... Have the same problem as you - I'm getting sidetracked by other fun stuff :laugh: .

The UCC_DRAW_COMPLETE procedure is called by both events, UCC paths aren't different. Quite a bugger. Probably makes more sense trying to find out why the custom name and icon in the final image doesn't seem to have any impending/lasting effect.
 
Last edited:
Newbie Spellweaver
Joined
Sep 4, 2008
Messages
39
Reaction score
0
i'm try uploaded my picture but when logout and relogin i see white picture and when i click it's show error CODE1 : and 2
 
Back
Top