Mirage Source

Free ORPG making software.
It is currently Fri Mar 29, 2024 5:17 am

All times are UTC




Post new topic Reply to topic  [ 1239 posts ]  Go to page 1, 2, 3, 4, 5 ... 50  Next
Author Message
 Post subject: MS4 Simple Question.
PostPosted: Fri Apr 17, 2009 6:03 am 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
Ok, I'm creating a player rep system that allows for players to give rep to other players. I've based this on the /setaccess command. Here is what I have for the handlesetrep
Code:
' ::::::::::::::::::::::::::
' :: Set access packet ::
' ::::::::::::::::::::::::::
Private Sub HandleSetRep(ByVal Index As Long, ByRef Parse() As String)
Dim n As Long
Dim i As Long


    n = FindPlayer(Parse(1))

    i = CLng(Parse(2))
   
    End If
   

            Call SetPlayerRep(n, i)
            Call SendPlayerData(n)
            Call AddLog(GetPlayerName(Index) & " has modified " & GetPlayerName(n) & "'s reputation.", ADMIN_LOG)
        Else
            Call PlayerMsg(Index, "Player is not online.", White)
        End If

End Sub


My problem is with this part here

Code:
Call SetPlayerRep(n, i)


it sets the player rep to i, i need it to add to the player rep, so it needs to look something like this

Code:
CallSetPlayerRep(n, (code for players rep) + i)


If it were setting the players own rep, it wouldn't be a problem, but I don't know how to code it to affect someone else's rep. The rep is located in the stat enum. Any help?


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Fri Apr 17, 2009 11:13 pm 
Offline
Knowledgeable

Joined: Fri May 18, 2007 9:54 pm
Posts: 234
It would probably have to have the players name in the command to, so it knows what player to set the rep. /setrep jsventor 2.

The server has a Function called FindPlayer(Name) i think.

_________________
Image


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Fri Apr 17, 2009 11:25 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
n = find player's index

player(n) - n is that player's index. So you don't have to do anything because in receiving the packet
we already looked for the player's index that we asked for (n = findplayer(parse).

Also in the SetPlayerFunction, it's obviously setting the players rep in that function correct?
Then when it sets it inside that function, player(n).rep = player(n).rep + i

That's the current reputation plus the given reputation. Get it?

_________________
Image


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Sat Apr 18, 2009 12:19 am 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
Ok, as I said, I have everything set up just like set access command. The SetPlayerRep is below.

Code:
Public Sub SetPlayerRep(ByVal Index As Long, ByVal Rep As Long)
    Player(Index).Char(TempPlayer(Index).CharNum).Skills(Skills.Rep) = Rep
End Sub


So I think I got it working correctly. Here is my Set Rep Packet. It works how I want it to, but my question, is this the best way to do it, or is there a different way?

Code:
' ::::::::::::::::::::
' :: Set Rep Packet ::
' ::::::::::::::::::::
Private Sub HandleSetRep(ByVal Index As Long, ByRef Parse() As String)
Dim n As Long
Dim i As Long
Dim r As Long


    n = FindPlayer(Parse(1))
    ' The access
    i = CLng(Parse(2))
    r = Player(n).Char(TempPlayer(n).CharNum).Skills(Skills.Rep)

           
            Call SetPlayerRep(n, (r + i))
            Call SendPlayerData(n)
            Call AddLog(GetPlayerName(Index) & " has modified " & GetPlayerName(n) & "'s reputation.", ADMIN_LOG)
        Else
            Call PlayerMsg(Index, "Player is not online.", White)
        End If

End Sub


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Sat Apr 18, 2009 1:54 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
I plan on doing a reputation system in my game Naruto Realm too.

What I plan to do is limit giving reputation points per month and gains by kill, only if the user killed has higher reputation
than the killer and in which the killed loses a rep.

_________________
Image


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Sat Apr 18, 2009 2:40 am 
Offline
Regular

Joined: Wed Jan 16, 2008 8:50 pm
Posts: 60
I'm planning on doing 2 rep systems. 1 the standard faction rep (kind of like mmorpg's where you have rep with factions) and a player rep whereyou get 3 points a day to give to whomever you feel deserve it. The next step in building my system is going to be limiting it to giving 3 points, and checks to see if you have enough rep to give to them. Then I plan on adding a check so it records the date that you were given less, and if the current date is higher than that, give the rep points and set the date to that days date. It's all going to be based on the server date, so I don't know how I'm going to do that (I don't know any code for calling the date from the server computer)


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Sat Apr 18, 2009 2:12 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
deathknight wrote:
I'm planning on doing 2 rep systems. 1 the standard faction rep (kind of like mmorpg's where you have rep with factions) and a player rep whereyou get 3 points a day to give to whomever you feel deserve it. The next step in building my system is going to be limiting it to giving 3 points, and checks to see if you have enough rep to give to them. Then I plan on adding a check so it records the date that you were given less, and if the current date is higher than that, give the rep points and set the date to that days date. It's all going to be based on the server date, so I don't know how I'm going to do that (I don't know any code for calling the date from the server computer)


Sounds great! Hope it all goes well for both of us.

_________________
Image


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Wed Dec 01, 2021 10:53 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.rumagnetotelluricfield.rumailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.ruсайтsemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoningtechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.ruhttp://temperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:05 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Econ


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:07 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
134.1


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:08 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:09 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bett


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:10 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Kobo


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:11 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Abba


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:12 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Wird


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:13 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Piet


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:14 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Loui


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:16 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Spla


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:17 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Cent


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:18 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Deko


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:19 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Bist


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:20 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Norm


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:21 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Abra


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:22 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Ridl


Top
 Profile  
 
 Post subject: Re: MS4 Simple Question.
PostPosted: Thu Jan 13, 2022 6:23 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456192
Vali


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1239 posts ]  Go to page 1, 2, 3, 4, 5 ... 50  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group