DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • March 22, 2019, 07:44:47 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Pvps in modules  (Read 3759 times)
0 Members and 1 Guest are viewing this topic.
Damien
Guest
« on: September 24, 2004, 10:34:14 AM »

In prerelease 7 and later it's possible to include pvp fights in modules (or at least I understood it so). I was wondering how this works? Is it pvpsupport.php file that I shoud use or what? I made a test module and I used functions from pvpsupport.php so that a player could attack other players and it always says  "Oops: That user is currently engaged by someone else, you'll have to wait your turn!" (attacked player was not engaged by anyone).  Am I using totally wrong file and functions to do this or what else could be wrong? Cry

- Damien
Logged
Kendaer
Guest
« Reply #1 on: September 27, 2004, 01:31:32 AM »

In prerelease 7 and later it's possible to include pvp fights in modules (or at least I understood it so). I was wondering how this works? Is it pvpsupport.php file that I shoud use or what? I made a test module and I used functions from pvpsupport.php so that a player could attack other players and it always says  "Oops: That user is currently engaged by someone else, you'll have to wait your turn!" (attacked player was not engaged by anyone).  Am I using totally wrong file and functions to do this or what else could be wrong? Cry

- Damien

There is a right way and a wrong way to do it.  I suspect you forgot to do a few small things Smiley  No, I don't have example code right now showing how to do it that is releaseable.  However, I do know that it works.   [I'd been working to get Aes' worldmap module to allow correct PVP from camping in the world to work, so I know it works since I have that working.  However, it's not done and not mine to release]

I suspect that what you forgot was
a) global $pvptimeout, $pvptime in your module functions which try to do pvp.
b) require_once("lib/pvplist.php") which is needed to set those global values.

Let me know if this helps you.  Otherwise, you could always post your code and let someone else look at it Smiley
Logged
Damien
Guest
« Reply #2 on: September 27, 2004, 07:46:58 AM »

I got it working. Thanks for your help, Kendaer, once again   Smiley

You always advise just the rights things, I don't know how, but I appreciate that you're so helpful Smiley

- Damien
Logged
Kendaer
Guest
« Reply #3 on: September 27, 2004, 01:28:19 PM »

I got it working. Thanks for your help, Kendaer, once again   Smiley

You always advise just the rights things, I don't know how, but I appreciate that you're so helpful Smiley

- Damien

*chuckle* Usually it's because I've run across those same mistakes before Smiley
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
25 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search